I would use http://code.google.com/p/html5lib/ if you want to include some safe tags.
See the "Sanitizing Tokenizer" section at http://code.google.com/p/html5lib/wiki/UserDocumentation.
Remember to test for vulnerabilities if it's an important service: http://ha.ckers.org/xss.html.