in reply to Regex: Strip <script> tags?
I use the following in a piece of code here:
# Strip <script [..]>..</script> and <style>..</style>
$content =~ s!<(s(?:cript|tyle))[^>]*>.*?</\1>!!gis;
Have a look at HTML::StripScripts::Parser, which allows you to customise the HTML / CSS that you would like to allow, while removing XSS attacks.
The wind blew the wrong way
Leaves on the line
The wrong kind of snow
Yes, but I didn't inhale
Categorically, er, no. Unless I was drunk at the time
The lines of Venus were in the wrong juxtaposition
No-one needs more than 640K of RAM
The dog ate my homework
It's my first day
Results (100 votes). Check out past polls.