This will fix what you're were talking about. You can loop through it as many times to remove unwanted script tags and everything within it
$bool = true; while ($bool) { $str = preg_replace('/<script\ .*?<\/.*?script>/i','', $str); if (!(preg_match('/<script\ .*?<\/.*?script>/i', $str))){ $bool = false; } }
In reply to Re^2: Regex: Strip <script> tags?
by Anonymous Monk
in thread Regex: Strip <script> tags?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |