From 9dee6ec7bf77e15a1227785292e507f1a6126a8f Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Wed, 27 Aug 2008 14:58:12 +0000 Subject: modified regex for image tag sanitization to retain trailing space and closing slash to remain valid XHTML --- system/libraries/Input.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Input.php b/system/libraries/Input.php index ff1dd9b15..dc5b5e5a9 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -685,7 +685,7 @@ class CI_Input { if (preg_match("/]*?)(>|$)#si", array($this, '_js_img_removal'), $str); + $str = preg_replace_callback("#]*?)(\s?/?>|$)#si", array($this, '_js_img_removal'), $str); } if (preg_match("/script/i", $str) OR preg_match("/xss/i", $str)) -- cgit v1.2.3-24-g4f1b