Browse files

force HTML for now

I have a number of specs that run against small chunks of HTML; since
nothing clearly identifies them as HTML, they were parsed as XML,
which resulted in all but the first parent tag being discarded.

Where I really want XML, I can construct the Document myself and all
will be well.
  • Loading branch information...
pd committed Nov 29, 2008
1 parent 6c73baf commit 1dea01f4cf51c4788920553112b957dce340427e
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rspec_hpricot_matchers/have_tag.rb
@@ -49,9 +49,9 @@ def hdoc_for(input)
if Nokogiri::XML::Document === input
elsif input.respond_to?(:body)
- Nokogiri.parse(input.body)
+ Nokogiri::HTML(input.body)
- Nokogiri.parse(input.to_s)
+ Nokogiri::HTML(input.to_s)

0 comments on commit 1dea01f

Please sign in to comment.