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


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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.