I am working on a project that allows users to input their own profile text, using any HTML markup they choose. CSS styles and HTML are all welcome; <script> tags are not. I am looking for a regex that will strip out the <script> tags for me.
I happened to find a solution given by someone named ender, which goes as follows:
s/<script>.*?<\/script>//igs;
However, I am unsure of how I would modify that regex to have it catch '<script ' at the beginning of the script(because it is common for there to be a space following the word 'script' with attributes). Does anyone know of what I would need to change?
In reply to Regex: Strip <script> tags? by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |