Unify StringUtil::decodeHTML() flags with ::encodeHTML()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 20 Jan 2022 10:29:39 +0000 (11:29 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 20 Jan 2022 10:29:39 +0000 (11:29 +0100)
see f631a7de6506e52095299c15042c25a3979a8200

wcfsetup/install/files/lib/util/StringUtil.class.php

index 918c560e863672bb645d22a62cabd9fe6f72ce14..7532bfd08901ae88199284b651ade3558a4034bd 100644 (file)
@@ -165,7 +165,11 @@ final class StringUtil
     {
         $string = \str_ireplace('&nbsp;', ' ', $string); // convert non-breaking spaces to ascii 32; not ascii 160
 
-        return @\html_entity_decode($string, \ENT_COMPAT, 'UTF-8');
+        return @\html_entity_decode(
+            $string,
+            \ENT_QUOTES | \ENT_SUBSTITUTE | \ENT_HTML401,
+            'UTF-8'
+        );
     }
 
     /**