1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-28 12:30:42 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2006-11-03 11:26:14 +00:00
parent a3bf1ed63e
commit daa3288a36
22 changed files with 140 additions and 97 deletions

View File

@@ -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>','[', ']', '.', ':');