diff options
Diffstat (limited to 'it_html.class')
-rw-r--r-- | it_html.class | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/it_html.class b/it_html.class index ece7070..bf9f8ff 100644 --- a/it_html.class +++ b/it_html.class @@ -459,8 +459,7 @@ function sanitize($html) function entity_decode($string) { $string = preg_replace('/&#(8217|65533);/', "'", html_entity_decode($string, ENT_COMPAT, $GLOBALS['it_html']->p['charset'])); - $string = preg_replace_callback('/�*([0-9a-f]+);/i', function($m) { return hexdec($m[1]) <= 255 ? chr(hexdec($m[1])) : " "; }, $string); - $string = preg_replace_callback('/�*([0-9]+);/', function($m) { return $m[1] <= 255 ? chr($m[1]) : " "; }, $string); + $string = preg_replace('/&#[^;]*;/i', " ", $string); # remove remaining illegal numeric entities, e.g. 0x80-0x9f return $string; } |