Hey guys,
I'm writing an app that accepts user input in the form of free-form text.
The problem is that the Spring HTML escaping tags are WAY too harsh for me. I want to allow links, <IMG SRC...> and formatting like <br/>, etc, but not free-form Javascript, stylesheets, etc.
With the Spring tags, I can turn the HTML and JavaScript off completely, but nothing in between.
Do you guys have any thoughts on how to best deal with this?
Ideally, we would pass in a list of valid tags into a parser, and then ask it to automatically parse and/or validate the user input.
Any other good approaches, or libraries? Like a modular Java-based BBCode type implementation?
Any thoughts would be welcome.
Andrew
Seattle, WA


Reply With Quote