I'm working with a number of malformed HTML pages. At least, I presume they're malformed because when I parse them in Nokogiri and then execute to_html, elements don't appear correctly anymore. When I parse them with Hpricot, however, they display correctly.
I'd rather not use Hpricot because it appears to be impossible to add Hpricot::Elem instances to a document (without converting them to strings, adding, then parsing again).
Can I disable Nokogiri's error correction so that I can preserve the HTML closer to the way it was written?