| Summary | non-multibyte-aware truncate function in View/Helper/Text.php |
| Queue | IMP |
| Queue Version | Git master |
| Type | Bug |
| State | Resolved |
| Priority | 1. Low |
| Owners | jan (at) horde (dot) org |
| Requester | Jasper.Olbrich (at) students (dot) uni-marburg (dot) de |
| Created | 05/06/2014 (4203 days ago) |
| Due | |
| Updated | 05/06/2014 (4203 days ago) |
| Assigned | |
| Resolved | 05/06/2014 (4203 days ago) |
| Github Issue Link | |
| Github Pull Request | |
| Milestone | 2.0.4 |
| Patch | No |
State ⇒ Resolved
Milestone ⇒ 2.0.4
commit df7b73bf32a1157e79b4165da528439610dad25c
Author: Jan Schneider <jan@horde.org>
Date: Tue May 6 14:31:20 2014 +0200
[jan] Make Horde_View_Helper_Text#truncate() and truncateMiddle()
multibyte-safe (
Bug #13163).framework/View/lib/Horde/View/Helper/Text.php | 13 ++++++-------
framework/View/package.xml | 4 ++--
framework/View/test/Horde/View/BaseTest.php | 2 +-
framework/View/test/Horde/View/Helper/TextTest.php | 2 +-
4 files changed, 10 insertions(+), 11 deletions(-)
http://github.com/horde/horde/commit/df7b73bf32a1157e79b4165da528439610dad25c
Priority ⇒ 1. Low
Patch ⇒ No
Milestone ⇒
Queue ⇒ IMP
Summary ⇒ non-multibyte-aware truncate function in View/Helper/Text.php
Type ⇒ Bug
State ⇒ Unconfirmed
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