0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-09-18 18:25:18 +00:00

Fix double-encoded quotes.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1508 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang 2008-01-18 07:04:30 +00:00
parent c43c0660f5
commit dd8ef4d3f5
2 changed files with 4 additions and 1 deletions

View File

@ -9,6 +9,9 @@ Changelog HTMLPurifier : Phorum Mod
. Internal change
==========================
Version 3.0.0.1 for Phorum 5.2, unknown release date
- Fixed double encoded quotes
Version 3.0.0 for Phorum 5.2, released January 12, 2008
# WYSIWYG and suppress_message options are now configurable via web
interface.

View File

@ -88,7 +88,7 @@ function phorum_htmlpurifier_format($data)
$body = $message['body'];
// order is important
$body = str_replace("<phorum break>\n", "\n", $body);
$body = str_replace(array('&lt;','&gt;','&amp;'), array('<','>','&'), $body);
$body = str_replace(array('&lt;','&gt;','&amp;', '&quot;'), array('<','>','&','"'), $body);
if (!$message_id && defined('PHORUM_CONTROL_CENTER')) {
// we're in control.php, so it was double-escaped
$body = str_replace(array('&lt;','&gt;','&amp;', '&quot;'), array('<','>','&','"'), $body);