lib/isodoc/function/utils.rb in isodoc-2.4.1 vs lib/isodoc/function/utils.rb in isodoc-2.4.2
- old
+ new
@@ -35,13 +35,17 @@
end
DOCTYPE_HDR = "<!DOCTYPE html SYSTEM " \
'"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'.freeze
+ HUGESTRICT =
+ Nokogiri::XML::ParseOptions::HUGE |
+ Nokogiri::XML::ParseOptions::STRICT
+
def to_xhtml(xml)
xml = to_xhtml_prep(xml)
begin
- Nokogiri::XML.parse(xml, &:strict)
+ Nokogiri::XML.parse(xml, nil, nil, HUGESTRICT)
rescue Nokogiri::XML::SyntaxError => e
File.open("#{@filename}.#{@format}.err", "w:UTF-8") do |f|
f.write xml
end
abort "Malformed Output XML for #{@format}: #{e} " \