diff --git a/lib/common.lib.php b/lib/common.lib.php index b9c787065..be838b2fe 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2900,10 +2900,12 @@ function clean_xss_tags($str) { $str_len = strlen($str); + $i = 0; while($i <= $str_len){ $result = preg_replace('#]*+>#i', '', $str); - if((string)$result === (string)$str) - break; + + if((string)$result === (string)$str) break; + $str = $result; $i++; }