Hey! No need to fight with the TokeParser, the guys at the W3C just thought about this issue and made a really cool soft called Tidy.If you're dealing on a daily basis with user-created HTML, you'll get addicted very fast to this one.

Basically, you feed it with anything that is loosely based on HTML (yes, even the Word2000 disgusting HTML output!) and it gives you a really nice output (HTML, XHTML, XML, you name it). It's highly configurable, so you can choose what to keep and what to weed out, it's fast and it works in command-line so you can pre-process user entries before creating them. Check it now!