Improve comparison of HTML in tests

Depending on the version of libxml you have installed, the HTML
generated by nokogiri can have slightly different whitespacing. This
changes the tests to check the markup for equivalence, rather than
direct string comparison.