From 46d2072e5ce0c13f3be2bd909d76eba37964740f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 18 Mar 2014 23:08:59 +0200 Subject: More xss_clean() improvements Issue described in https://github.com/EllisLab/CodeIgniter/issues/2667#issuecomment-37980030 + a false positive --- system/core/Security.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'system') diff --git a/system/core/Security.php b/system/core/Security.php index a4d8c95ef..17ba3bcd8 100644 --- a/system/core/Security.php +++ b/system/core/Security.php @@ -454,7 +454,7 @@ class CI_Security { if (preg_match('/]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); + $str = preg_replace_callback('#]+([^>]*?)(?:>|$)#si', array($this, '_js_link_removal'), $str); } if (preg_match('/