About This Demo
This demo shows how you can sanitise user-entered HTML and then display it, safe in the knowledge it isn't going to completely screw up the HTML of your site's design.
Notice there are numerous errors in the HTML. Not only does the H3 end with a H4, but the DIV element is unclosed. If the errors aren't rectified it's likely to have a nasty side effect on the layout of the page produced. Luckily the WQS will make sure it's closed. Whether or not the user intends any harm it's always good to sanitise their input.