strip_tags is just awful

strip_tags is possibly the worst of all the builtin PHP functions. It doesn’t even remotely do what it says. It is absolutely useless on user input because it strips everything from the first “<” it sees to the next “>” so if your input is

"<p>I <3 Monkeys</p>

its output is

I 

!!! And what else are you stripping tags from apart from user input? Avoid.

Leave a Reply

Your email address will not be published.