6.0.0-beta1
10/18/25

[#11069] wrong utf-8 encondigs at html viewer
Summary wrong utf-8 encondigs at html viewer
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Not A Bug
Priority 3. High
Owners
Requester ak (at) lps (dot) komi (dot) ru
Created 03/12/2012 (4968 days ago)
Due 03/12/2012 (4968 days ago)
Updated 03/13/2012 (4967 days ago)
Assigned
Resolved 03/13/2012 (4967 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
03/13/2012 10:24:28 AM Jan Schneider Comment #4 Reply to this comment
1)libxml2 is the lattest availible via remi/epel/centos repos on 
Cenos5: it is 2.6.26.
This IS outdated. See 
http://www.horde.org/apps/horde/docs/INSTALL#prerequisites
03/13/2012 10:00:59 AM ak (at) lps (dot) komi (dot) ru Comment #3 Reply to this comment
1)libxml2 is the lattest availible via remi/epel/centos repos on 
Cenos5: it is 2.6.26.
2) Do you think that adding to the beginning of html content of string 
"<?xml ...>" is more corect that adding of 
<html><head><!--a75c305b1c0a6022--><meta ..> ? BTW it is also a 
hack,that creates ambiguous content.
3)I am not overwrite the html content -I just add more to the 
begginning of content, I suppose
3)It is easy to proof - but I dont plan to do test cases for such 
thing, I can just send 2 e-mails with attachments- html content and 
image with screenshot of correct rendering.
4) my solution works fine, and I know that many non-latin users need 
ANY solution that works!
03/13/2012 09:39:03 AM Michael Slusarz Comment #2
State ⇒ Not A Bug
Reply to this comment
No.  You can't go inserting HTML tags into HTML data, because you are 
overwriting the contents of the HTML data.

Not to mention there is no reproducible issue here.  At a minimum, 
someone would have to provide a failing test case.

This is most likely due to an out-of-date libxml anyway.
03/12/2012 09:31:48 AM ak (at) lps (dot) komi (dot) ru Comment #1
Priority ⇒ 3. High
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Due ⇒ 03/12/2012
Summary ⇒ wrong utf-8 encondigs at html viewer
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
When we are using "View HTML data in new window" function the 
framework creates DOMDocument to make cleaning and de-XSS.
There is a problem here with utf-8 (discussed   
php.net/manual/en/domdocument.loadhtml.php)
I found the bug and fixed in my distribution (PEAR/Horde/Domhtml.php line 68):
Use $doc->loadHTML('<html><head><!--a75c305b1c0a6022--><meta 
http-equiv="content-type" content="text/html; charset=UTF-8">' .
  Horde_String::convertCharset($text, $charset, 'UTF-8'));
instead of $doc->loadHTML($this->_xmlencoding . 
Horde_String::convertCharset($text, $charset, 'UTF-8'));

Saved Queries