diff --git a/lib/approvals/writers/html_writer.rb b/lib/approvals/writers/html_writer.rb index 42ecf2a..429575a 100644 --- a/lib/approvals/writers/html_writer.rb +++ b/lib/approvals/writers/html_writer.rb @@ -7,7 +7,7 @@ def extension end def format(data) - Nokogiri::XML(data.to_s.strip,&:noblanks).to_xhtml(:indent => 2, :encoding => 'UTF-8') + Nokogiri::HTML(data.to_s.strip,&:noblanks).to_xhtml(:indent => 2, :encoding => 'UTF-8') end end diff --git a/spec/approvals_spec.rb b/spec/approvals_spec.rb index bf271d2..0715c55 100644 --- a/spec/approvals_spec.rb +++ b/spec/approvals_spec.rb @@ -57,6 +57,17 @@ def hello.inspect Approvals.verify html, :format => :html, :namer => namer end + it "verifies a malformed html fragment" do + html = <<-HTML + + +