]> 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:33:53 +0000 (17:33 +0100)
lib-php/DebugHtml.php

index ea3d514fd320e4972e37ed8c9fea41781aa4f57a..8befc30be8da46ab70fb6528e69004fddb9eb90a 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);
     }
 }