From: Sarah Hoffmann Date: Mon, 20 Feb 2023 15:46:53 +0000 (+0100) Subject: harmonize flags for PHP's htmlspecialchars X-Git-Tag: v3.7.3~1 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/9f4596156d9e6915e05503e5d356601cb2c76caa harmonize flags for PHP's htmlspecialchars --- diff --git a/lib-php/DebugHtml.php b/lib-php/DebugHtml.php index 702b7899..495206b5 100644 --- a/lib-php/DebugHtml.php +++ b/lib-php/DebugHtml.php @@ -127,7 +127,7 @@ class Debug public static function printSQL($sSQL) { - echo '

'.htmlspecialchars($sSQL).'

'."\n"; + echo '

'.htmlspecialchars($sSQL, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401).'

'."\n"; } private static function outputVar($mVar, $sPreNL) @@ -175,7 +175,7 @@ class Debug $sOut = (string)$mVar; } - echo htmlspecialchars($sOut); + echo htmlspecialchars($sOut, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401); return strlen($sOut); } }