diff options
author | Urban Müller | 2014-06-27 17:56:38 +0200 |
---|---|---|
committer | Urban Müller | 2014-06-27 17:56:38 +0200 |
commit | a96f58e2fc1239b0f80a4d478472a4f2e1f714d4 (patch) | |
tree | 7bf6f8d3ff33756c779621736e77eafd23683b51 | |
parent | c3044c1d849427028e087a9ec4ef847d732462c6 (diff) | |
download | itools-a96f58e2fc1239b0f80a4d478472a4f2e1f714d4.tar.gz itools-a96f58e2fc1239b0f80a4d478472a4f2e1f714d4.tar.bz2 itools-a96f58e2fc1239b0f80a4d478472a4f2e1f714d4.zip |
link urls
-rw-r--r-- | it_debug.class | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/it_debug.class b/it_debug.class index 458fc90..7780b70 100644 --- a/it_debug.class +++ b/it_debug.class @@ -143,6 +143,9 @@ static function dump($args) if (isset($_SERVER['REMOTE_ADDR']) && !$plain) # html encode content and link any urls $item = htmlspecialchars($item, ENT_COMPAT, "ISO-8859-1"); + if (!$plain) + $item = preg_replace("#http://[^ ']*#", "<a href='\$0'>$0</a>", $item); + if (preg_match('/^[\'"]/', $var)) $r .= "$item "; else { |