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.
By rote learning.
Via Genetic memory.
It's provided by my firmware.
I just remember them.
Thirty days hath September
My computer gets it right, usually.
I just ask someone else.
Someone punches me on the first of the month.
Results (191 votes),