Let's say I allow users to enter raw HTML in a web page. Let's say users are stupid and don't know how to write validate HTML. How can I clean up and simplify their code?
is simplified in
is cleaned up in
<b>lorem <i>ipsum</b> dolor</i>
(or something similar).
<b>lorem <i>ipsum</i></b> dolor
Is there any Ext JS function or plugin to do that? Or any external JS library?
I've been trying to make my own algorithm but it's not really trivial...