Pros and Cons of Java HTML to XML cleaners
I am looking to allow HTML emails (and other HTML uploads) without letting in scripts and stuff. I plan to have a white list of safe tags and attributes as well as a whitelist of CSS tags and value regexes (to prevent automatic return receipt).

I asked a question: http://stackoverflow.com/questions/4401558/parse-a-badly-formatted-xml-document-like-an-html-file

I found there are many **many** ways to do this. Some systems have built in sanitizers (which I don't care so much about).

I will post some answers and say Community Wiki. Please post any other options you like and say Community Wiki so they can be voted on. Also any comments or wiki edits on what part of a certain product is better and what is not would be greatly appreciated
Pros and Cons of Java HTML to XML cleaners
===

I am looking to allow HTML emails (and other HTML uploads) without letting in scripts and stuff. I plan to have a white list of safe tags and attributes as well as a whitelist of CSS tags and value regexes (to prevent automatic return receipt).

I asked a question: http://stackoverflow.com/questions/4401558/parse-a-badly-formatted-xml-document-like-an-html-file

I found there are many **many** ways to do this. Some systems have built in sanitizers (which I don't care so much about).

I will post some answers and say Community Wiki. Please post any other options you like and say Community Wiki so they can be voted on. Also any comments or wiki edits on what part of a certain product is better and what is not would be greatly appreciated