diff --git a/lib-php/DebugHtml.php b/lib-php/DebugHtml.php index 19221b43..ea3d514f 100644 --- a/lib-php/DebugHtml.php +++ b/lib-php/DebugHtml.php @@ -127,7 +127,7 @@ class Debug public static function printSQL($sSQL) { - echo '

'.$sSQL.'

'."\n"; + echo '

'.htmlspecialchars($sSQL).'

'."\n"; } private static function outputVar($mVar, $sPreNL) @@ -170,11 +170,12 @@ class Debug } if (is_string($mVar)) { - echo "'$mVar'"; - return strlen($mVar) + 2; + $sOut = "'$mVar'"; + } else { + $sOut = (string)$mVar; } - echo (string)$mVar; - return strlen((string)$mVar); + echo htmlspecialchars($sOut); + return strlen($sOut); } }