From a5715b0a60991eff22fb5c34f5b3275333949e3d Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 10 Jun 2011 15:33:15 +0000 Subject: link urls --- it_debug.class | 4 ++-- 1 file 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]+)#", '$1', htmlspecialchars($item)); if (preg_match('/^[\'"]/', $var)) $r .= "$item "; -- cgit v1.2.3