Skip to content
Snippets Groups Projects
Commit 13493794 authored by Andreas Gohr's avatar Andreas Gohr
Browse files

run dbg() output through htmlspecialchars

parent defa93a1
No related branches found
No related tags found
No related merge requests found
......@@ -289,9 +289,15 @@ function msg($message,$lvl=0,$line='',$file=''){
* @author Andreas Gohr <andi@splitbrain.org>
*/
function dbg($msg,$hidden=false){
(!$hidden) ? print '<pre class="dbg">' : print "<!--\n";
print_r($msg);
(!$hidden) ? print '</pre>' : print "\n-->";
if($hidden){
echo "<!--\n";
print_r($msg);
echo "\n-->";
}else{
echo '<pre class="dbg">';
echo hsc(print_r($msg,true));
echo '</pre>';
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment