Stripping HTML when posting message through API
When posting a message through the REST API, it can happen a user inserts unvalid HTML into the message body. When the server replies with an error status 100, it says it changed the HTML, but thats not true. That only applies when using the default tinyMCE editor Lithium suplies.
So question is: is there a function that strips out the HTML to become 'valid', trough Javascript OR Freemarker Util? For example, the smileys used from within tinyMCE, contain img attributes that are not allowed once 're-used' (like the class=""). So has to be stripped out.
I found this:
http://community.lithium.com/t5/Developers-Knowledge-Base/utils-FreeMarker-context-object/ta-p/9345
utils.html.stripper.from.owasp
But not sure if its any good.
How is it done on the backend of Lithium?
Thanks