diff options
author | Urban Müller | 2011-06-10 15:33:15 +0000 |
---|---|---|
committer | Urban Müller | 2011-06-10 15:33:15 +0000 |
commit | a5715b0a60991eff22fb5c34f5b3275333949e3d (patch) | |
tree | 776f359cecf252dac5cef412b1df5d77444d2285 | |
parent | 464a1482a569cd46e3da0cfadee479669e994c04 (diff) | |
download | itools-a5715b0a60991eff22fb5c34f5b3275333949e3d.tar.gz itools-a5715b0a60991eff22fb5c34f5b3275333949e3d.tar.bz2 itools-a5715b0a60991eff22fb5c34f5b3275333949e3d.zip |
link urls
-rw-r--r-- | it_debug.class | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/it_debug.class b/it_debug.class index b653d22..941576c 100644 --- a/it_debug.class +++ b/it_debug.class @@ -145,8 +145,8 @@ function dump($args) #$item = preg_replace('#\s+var \$_(.|\n)*?;\s*\n#', "", $item); $item = "$red$item$nored"; - if (isset($_SERVER['REMOTE_ADDR']) && !$plain) - $item = htmlspecialchars($item); + if (isset($_SERVER['REMOTE_ADDR']) && !$plain) # html encode content and link any urls + $item = preg_replace("#(http://[^'\"\s]+)#", '<a style="color:red" href="$1">$1</a>', htmlspecialchars($item)); if (preg_match('/^[\'"]/', $var)) $r .= "$item "; |