[Tickets #7305] broken php htmlspecialchars workaround needed
bugs at horde.org
bugs at horde.org
Mon Sep 8 14:56:36 UTC 2008
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/7305
------------------------------------------------------------------------------
Ticket | 7305
Created By | viljo.viitanen at helsinki.fi
Summary | broken php htmlspecialchars workaround needed
Queue | Horde Framework Packages
Version | FRAMEWORK_3
Type | Bug
State | Unconfirmed
Priority | 3. High
Milestone |
Patch |
Owners |
+New Attachment | horde-text-filter-text2html-htmlspecialchars.txt
------------------------------------------------------------------------------
viljo.viitanen at helsinki.fi (2008-09-08 10:56) wrote:
php htmlspecialchars function is stupid: When presented with invalid
character data (e.g. raw latin1 'ä') and encoding is set to utf-8
(also possibly other multibyte encodings), htmlspecialchars returns
empty string (http://bugs.php.net/bug.php?id=43896).
horde should compensate for this, as not showing anything in an email
when it contains broken utf-8 data is just plain wrong.
So, before using htmlspecialchars with charset utf-8, data should be
checked that it is (at least) valid utf-8.
Not sure if this is horde or imp bug. In our local installation I
fixed the problem with attached patch to
lib/Horde/Text/Filter/text2html.php. We get a lot of messages with
broken utf-8, unfortunately.
More information about the bugs
mailing list