From: Sarah Hoffmann Date: Mon, 20 Feb 2023 15:46:53 +0000 (+0100) Subject: harmonize flags for PHP's htmlspecialchars X-Git-Tag: v4.3.0~94 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/d078763fa1f21434b825a0a2e0e6aa2858e1f9d2?hp=412ead5f2df764cdbcd52c15c86297960a19de72 harmonize flags for PHP's htmlspecialchars --- diff --git a/lib-php/DebugHtml.php b/lib-php/DebugHtml.php index 2207d529..7b0cba2d 100644 --- a/lib-php/DebugHtml.php +++ b/lib-php/DebugHtml.php @@ -135,7 +135,7 @@ class Debug public static function printSQL($sSQL) { - echo '

'.date('c').' '.htmlspecialchars($sSQL).'

'."\n"; + echo '

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

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