]> git.openstreetmap.org Git - nominatim.git/commitdiff
harmonize flags for PHP's htmlspecialchars
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 20 Feb 2023 15:46:53 +0000 (16:46 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 20 Feb 2023 16:24:16 +0000 (17:24 +0100)
lib-php/DebugHtml.php

index 702b7899b4dc1b87caaf32a9dc85389d3136f7ce..495206b55ef10f2ab45a4d4b92f3eb6c371d36a9 100644 (file)
@@ -127,7 +127,7 @@ class Debug
 
     public static function printSQL($sSQL)
     {
-        echo '<p><tt><font color="#aaa">'.htmlspecialchars($sSQL).'</font></tt></p>'."\n";
+        echo '<p><tt><font color="#aaa">'.htmlspecialchars($sSQL, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401).'</font></tt></p>'."\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);
     }
 }