6.0.0-beta1
7/8/25

[#10674] HTML <head> tag attributes displayed
Summary HTML <head> tag attributes displayed
Queue IMP
Queue Version 5.0.14
Type Bug
State Not A Bug
Priority 1. Low
Owners
Requester roborg (at) hotmail (dot) com
Created 10/21/2011 (5009 days ago)
Due
Updated 10/24/2011 (5006 days ago)
Assigned 10/24/2011 (5006 days ago)
Resolved 10/24/2011 (5006 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
10/24/2011 08:06:18 PM Michael Slusarz Comment #8
State ⇒ Not A Bug
Reply to this comment
Would it be possible to have the installer warn if PHP or its libs 
are too old to function correctly with Horde?
We already test in the Horde test script.  I don't know of any way of 
testing for this dependency using PEAR (to test the version, you need 
to check the value of a constant defined within the PHP environment).
10/24/2011 07:55:18 PM roborg (at) hotmail (dot) com Comment #7 Reply to this comment
Damn, I've got 2.6.
I've asked my host if they can upgrade it so if they can I'll test it 
again and update the ticket with the results, though it seems likely 
that's the cause.

Would it be possible to have the installer warn if PHP or its libs are 
too old to function correctly with Horde?

10/24/2011 05:31:59 PM Michael Slusarz Comment #6 Reply to this comment
I can't reproduce either, with tidy both enabled and disabled.

This looks like a libxml parsing issue, which is not a Horde issue.   
Are you sure you are using a version of libxml >= 2.7? 
(horde/docs/INSTALL)
10/24/2011 10:53:21 AM roborg (at) hotmail (dot) com Comment #5 Reply to this comment
I've tracked it down a little more... it's in Horde_Mime_Viewer_Html 
(called from IMP_Mime_Viewer_Html - imp/Mime/Viewer/Html.php line 184)

$data = $this->_cleanHTML($data, array(
             'noprefetch' => ($inline && (IMP::getViewMode() != 'mimp')),
             'phishing' => $inline
         ));

to test it you can add this line in before, then var_dump($data) after:
  $data = 'test <html this="a test"><body>HTML part</body></html>';

Expected:

string(246) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 
Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><!--a75c305b1c0a6022--><meta 
http-equiv="x-dns-prefetch-control" 
value-equiv="off"></head><body>HTML part</body></html>
"

Actual:

string(246) "<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 
Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html><body><p>test </p> this="a test"&gt;HTML 
part</body></html><head><!--a75c305b1c0a6022--><meta 
http-equiv="x-dns-prefetch-control" value-equiv="off"></head>
"
10/24/2011 10:22:52 AM roborg (at) hotmail (dot) com Comment #4
New Attachment: bug.txt Download
Reply to this comment
Hi,

Thanks for looking at it but I don't think it's a bug in the IMAP 
server. I've narrowed down the test case a lot - it seems that if 
there's anything before the <html> tag then it will display the 
attributes.

I have this in my mime_drivers.local.php (probably should have 
mentioned this before, sorry!)

$mime_drivers['html']['inline'] = true;

10/24/2011 09:17:36 AM Jan Schneider Comment #3
Priority ⇒ 1. Low
State ⇒ Feedback
Reply to this comment
Cannot reproduce with or without tidy extension enabled. Must be some 
issue with your IMAP server.
10/21/2011 09:41:41 AM roborg (at) hotmail (dot) com Comment #2
New Attachment: html.png Download
Reply to this comment
Attaching screenshot of the previously attached email
10/21/2011 09:40:49 AM roborg (at) hotmail (dot) com Comment #1
Priority ⇒ 3. High
State ⇒ Unconfirmed
New Attachment: view.php.txt Download
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ HTML <head> tag attributes displayed
Type ⇒ Bug
Reply to this comment
Attributes of the <html> tag are dumped into the browser .

Saved Queries