Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.2.3

Bug #13136 PHP 5.2.5 breaks Text_Wiki due to new htmlentities() behaviour
Submitted: 2008-02-17 13:17 UTC
From: andrerav Assigned:
Status: Duplicate Package: Text_Wiki (version 1.2.0)
PHP Version: 5.2.5 OS: Any
Roadmaps: (Not assigned)    
Subscription  


 [2008-02-17 13:17 UTC] andrerav (Andreas Ravnestad)
Description: ------------ PHP 5.2.5 has changed htmlentities() behaviour which now returns an empty string on invalid unicode sequences, if xhtml formatconf charset is set to UTF-8. See: * Line 72 in Text/Wiki/Render/Xhtml.php * http://bugs.php.net/bug.php?id=43896 (regarding changed behaviour) Test script: --------------- [ set up a $parser, some $rules, and a $render ] $wiki = Text_Wiki_Mediawiki::singleton($parser, $rules); $wiki->setFormatConf('Xhtml', 'charset', 'UTF-8'); $result = $wiki->transform('anything', $render); Expected result: ---------------- <p>anything</p> Actual result: -------------- Empty string.

Comments

 [2008-03-11 09:53 UTC] niels (Niels Lastname)
The problem is that the default delimiter is \xFF, which is invalid in UTF-8. You can change it to something else and things will work again.
 [2008-03-12 09:14 UTC] niels (Niels Lastname)
This is a duplicate of bug 12490.