javascript code for fixing malform HTML
<p>Is there any open source library that can turn malform HTML into well formatted (not just pretty printed) HTML , like what firebug does?</p>

<p>For example,</p>

<pre><code>&lt;tr class=row&gt;&lt;td&gt;content&lt;/tr&gt;
</code></pre>

<p>may become</p>

<pre><code>&lt;tr class="row"&gt;&lt;td&gt;content&lt;/td&gt;&lt;/tr&gt;
</code></pre>
