best way to secure simple wysiwyg with php
i have added a simple wysiwyg editor in my website. (it only allows B / I / U - no more) I currently store all content as html in my database - but atm it's simple to add <a onclick='...'> or other malicious code) Whats the best way in PHP to parse the input safely? How to implement <b></b> <i></i> and so on as whitelist and encode everything else? Layke HTMLPurifier I'm just going to throw this one out there and probably get the inevitable lashing. I would not use strip_tags to secure your WYSIWYG form... ever (Unless you want to piss off your users). It won't secure your form, and you may be