HTMLPurifier
I'm just going to drop it there and probably get the inevitable mount. I would not use strip_tags to protect your WYSIWYG form ... ever (unless you want to make you angry).
It will not protect your form, and you may be killing your user interface.
Chris Shiftlett wrote a great paragraph on his blog
I hate commenting on blogs where my comment is passed through something like strip_tags (), effectively distorting what I'm trying to say. This reminds me of using an IM client that tries to identify emoticons and replace them with images, often making messages difficult to decrypt.
Another reason
Someone else in another answer also wrote this that I like:
$str = "10 appels is <than 12 apples"; var_dump(strip_tags($str));
The output I get is:
string '10 appels is ' (length=13)
I personally would not use anything other than HTMLPurifier
HTMLPurifier
HTMLPurifier
Try the demo here: http://htmlpurifier.org/demo.php
And look at this similar question
Layke
source share