I'm implementing an email web client. Sometimes some emails come with HTML content. For security reasons I don't want to render the HTML code as it comes from the original source, but escape or even change the value of some unsafe elements or properties. I was about to start working on a library to do this, but I thought that maybe there is already some work done on this.
Is there any Java library that already does this?
Some examples of functionality I'm looking for:
- Changing property "src" in element "img" for a stakeholder image
- Remove "stript" elements.
- Remove "import" at-rule.
I don't mind if such library is open-source or proprietary, just want to know if there is something already done about it.