in reply to Regex: Strip <script> tags?
This will fix what duelafn was 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; } }
|
|---|