From daa3288a368ddac0335dde7ee2a718883bfb2fdc Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 3 Nov 2006 11:26:14 +0000 Subject: - implemented the suggested html_entity_decode function made by david - fixed string length checking by also decoding entities for the sake of checking - used the new html_entity_decode function git-svn-id: file:///svn/phpbb/trunk@6545 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/message_parser.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/includes/message_parser.php') diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 46dfd1cf6d..90d08a64c5 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -365,10 +365,10 @@ class bbcode_firstpass extends bbcode // Having it here saves us one preg_replace per message containing [code] blocks // Additionally, magic url parsing should go after parsing bbcodes, but for safety those are stripped out too... $htm_match = get_preg_expression('bbcode_htm'); - $htm_match[3] = '#&\#([0-9]+);#'; - unset($htm_match[4]); +// $htm_match[3] = '/&#([0-9]+);/'; + unset($htm_match[3], $htm_match[4]); - $htm_replace = array('\1', '\2', '\1', '&#\1;'); + $htm_replace = array('\1', '\2', '\1'); //, '&#\1;'); $out = ''; @@ -419,7 +419,7 @@ class bbcode_firstpass extends bbcode } // Because highlight_string is specialcharing the text (but we already did this before), we have to reverse this in order to get correct results - $code = html_entity_decode($code); + $code = utf8_html_entity_decode($code); $code = highlight_string($code, true); $str_from = array('', '', '','[', ']', '.', ':'); -- cgit v1.2.1