From 49429cfe68d8d576d6c0a0fc954e57b452dd5d41 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 17 Mar 2023 15:16:36 +0100 Subject: remove unprintables in ED as well so xss.php can use them for testing --- it_debug.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it_debug.class') diff --git a/it_debug.class b/it_debug.class index 91342bd..5e89385 100644 --- a/it_debug.class +++ b/it_debug.class @@ -190,7 +190,7 @@ static function dump($args, $p = []) $item = "$red$item$nored"; if ($p['html']) - $item = preg_replace("#(https?:)?//[^\s'\"]+#", "\$0", strtr($item, $htmlspecialchars)); # htmlspecialchars() does not like bad utf8 + $item = it::replace('[\x00-\x08\x0b-\x0c\x0e-\x1f]' => "", preg_replace("#(https?:)?//[^\s'\"]+#", "\$0", strtr($item, $htmlspecialchars)), 'utf8' => false); # htmlspecialchars() does not like bad utf8 if (preg_match('/^[\'"]/', $var)) $r .= "$item "; -- cgit v1.2.3