From 48291d1064105f40bd72e5ede776d94c25178e32 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 26 Feb 2025 18:04:24 +0100 Subject: decode all html entities including ' --- it_html.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_html.class') diff --git a/it_html.class b/it_html.class index e9c1c67..e3053b6 100644 --- a/it_html.class +++ b/it_html.class @@ -432,7 +432,7 @@ static function sanitize($html) static function entity_decode($string) { $charset = $GLOBALS['it_html']->p['charset']; - $string = preg_replace('/&#(8217|65533);/', "'", html_entity_decode($string, ENT_COMPAT, $charset)); + $string = preg_replace('/&#(8217|65533);/', "'", html_entity_decode($string, ENT_QUOTES | ENT_HTML5, $charset)); $string = preg_replace('/&#[^;]*;/i', " ", $string); # remove remaining illegal numeric entities, e.g. 0x80-0x9f return self::_cleanup($string, $charset); -- cgit v1.2.3