madrazel Posted May 14, 2007 Share Posted May 14, 2007 in example: <script /*whatever here*/> /*anything between, Chinese, Korean, Arabic characters, line breaks etc..*/ </script> i done this: $str = preg_replace('/<script(\n|\t|-|[[]|[]]|[a-z0-9!?@&%*+<>(){};:,._=\'"\/| ])+<\/script>/i','', $str); but it still occasionally leaves behind some tags.. Quote Link to comment Share on other sites More sharing options...
Wildbug Posted May 14, 2007 Share Posted May 14, 2007 Um, why didn't you just use: $str = preg_replace('|<script.*?</script>|is','',$str); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.