I have an editing window that allows my authorized users to enter in HTML which is then stored in a database after they click submit. Unfortunately it is something like this:
<ul class="controls-buttons">
<li class="sep"></li>
<li id="home">
<a title="Home" <a="" data-href="x">xx</a></li>
</ul>
Is there a way that I can check the HTML string before storing it in the database to ensure it is valid HTML markup? For example here note the use of <a
and <a