I store html data in a database.
The html data is very simple, and is generated by a wysiwyg editor.
Before I store the html data in the database and I run it through HTMLPurifier, to remove any badness.
When I output data back out to the browser, because it is html data, obviously I cannot use php's htmlspecialchars().
I am wondering if there are any problems with this as far as XSS attacks are concerned. Is passing the data through HTMLPurifier before saving in the database enough? Are there any things I am missing / other steps I should be taking?
Thanks (in advance) for your help.