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

index e402654f5d03ccd688e15fa2222e836ca655fdb1..8a4d40e2c69f43f6b021cfada5bb6e8e1fb34c24 100644 (file)
@@ -135,7 +135,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)
@@ -183,7 +183,7 @@ class Debug
             $sOut = (string)$mVar;
         }
 
-        echo htmlspecialchars($sOut);
+        echo htmlspecialchars($sOut, ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401);
         return strlen($sOut);
     }
 }