summaryrefslogtreecommitdiff
path: root/inc/infoutils.php
diff options
context:
space:
mode:
authorAndreas Gohr <gohr@cosmocode.de>2010-02-08 13:33:41 +0100
committerAndreas Gohr <gohr@cosmocode.de>2010-02-08 13:33:41 +0100
commit134937946849b8225648f9c191a006ec60c1f013 (patch)
tree48f739643897713b59c10b294b529f000417bed2 /inc/infoutils.php
parentdefa93a1bf01353fdadea22bcc5467baaadca3e0 (diff)
downloadrpg-134937946849b8225648f9c191a006ec60c1f013.tar.gz
rpg-134937946849b8225648f9c191a006ec60c1f013.tar.bz2
run dbg() output through htmlspecialchars
Diffstat (limited to 'inc/infoutils.php')
-rw-r--r--inc/infoutils.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/inc/infoutils.php b/inc/infoutils.php
index d5356969b..001a33f66 100644
--- a/inc/infoutils.php
+++ b/inc/infoutils.php
@@ -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>';
+ }
}
/**