title: How do I make JTIdy make HTML documents well-formed?
body: <p>I'm using JTidy v. r938.  I'm using this code to attempt to clean up a page …</p>
  
  <pre><code>final Tidy tidy = new Tidy();
  tidy.setQuiet(false);
  tidy.setShowWarnings(true);
  tidy.setShowErrors(0);
  tidy.setMakeClean(true);
  Document document = tidy.parseDOM(conn.getInputStream(), null);
  </code></pre>
  
  <p>But when I parse this URL -- <a href="http://www.chicagoreader.com/chicago/EventSearch?narrowByDate=This+Week&amp;eventCategory=93922&amp;keywords=&amp;page=1" rel="noreferrer">http://www.chicagoreader.com/chicago/EventSearch?narrowByDate=This+Week&amp;eventCategory=93922&amp;keywords=&amp;page=1</a>, things aren't getting cleaned up.  For example, the META tags on the page, like</p>
  
  <pre><code>&lt;META http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  </code></pre>
  
  <p>remain as </p>
  
  <pre><code>&lt;META http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
  </code></pre>
  
  <p>instead of having a "&lt;/META&gt;" tag or appearing as "&lt;META http-equiv="Content-Type" content="text/html; charset=UTF-8"/&gt;".  I confirm this by outputting the resulting JTidy org.w3c.dom.Document as a String. </p>
  
  <p>What can I do to make JTidy truly clean up the page -- i.e. make it well-formed?  I realize there are other tools out there, but this question specifically relates to using JTIdy.</p>