diff options
author | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-03 11:26:14 +0000 |
---|---|---|
committer | Meik Sievertsen <acydburn@phpbb.com> | 2006-11-03 11:26:14 +0000 |
commit | daa3288a368ddac0335dde7ee2a718883bfb2fdc (patch) | |
tree | ddca8411bb3c8fc81050ea1e654a8ea726d9c5a0 /phpBB/includes/message_parser.php | |
parent | a3bf1ed63ec7aa281b0d47d6f3e87eeeeafbaff5 (diff) | |
download | forums-daa3288a368ddac0335dde7ee2a718883bfb2fdc.tar forums-daa3288a368ddac0335dde7ee2a718883bfb2fdc.tar.gz forums-daa3288a368ddac0335dde7ee2a718883bfb2fdc.tar.bz2 forums-daa3288a368ddac0335dde7ee2a718883bfb2fdc.tar.xz forums-daa3288a368ddac0335dde7ee2a718883bfb2fdc.zip |
- 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
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 8 |
1 files changed, 4 insertions, 4 deletions
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('<span style="color: ', '<font color="syntax', '</font>', '<code>', '</code>','[', ']', '.', ':'); |