Do you know of any good lightweight library in java to make good and safe HTML representation of user input? That’s very generic task, I think. Consider: user leaves a comment in the blog – my task is to convert user comment into safe & nice HTML content.
Share
Use the jsoup HTML Cleaner with a configuration specified by a Whitelist.
Excerpt from the Jsoup Cookbook.