[Tickets #13163] non-multibyte-aware truncate function in View/Helper/Text.php
noreply at bugs.horde.org
noreply at bugs.horde.org
Tue May 6 11:51:06 UTC 2014
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/13163
------------------------------------------------------------------------------
Ticket | 13163
Created By | Jasper.Olbrich at students.uni-marburg.de
Summary | non-multibyte-aware truncate function in
| View/Helper/Text.php
Queue | IMP
Version | Git master
Type | Bug
State | Unconfirmed
Priority | 1. Low
Milestone |
Patch |
Owners |
------------------------------------------------------------------------------
Jasper.Olbrich at students.uni-marburg.de (2014-05-06 11:51) wrote:
The function truncate in framework/View/lib/Horde/View/Helper/Text.php
uses substr and thus fails for example for utf8-strings. To reproduce,
try to view a mail with this subject
1234567890123456789012345678901234567890123456ü__________________
in "Minimal" mode. This results in the following log entry
PHP ERROR: htmlspecialchars(): Invalid multibyte sequence in argument
because the ü is broken by substr.
There already is a multibyte-aware version of this function in
framework/Util/lib/Horde/String.php
More information about the bugs
mailing list