lib/asciidoctor/itu/cleanup.rb in metanorma-itu-0.2.10 vs lib/asciidoctor/itu/cleanup.rb in metanorma-itu-1.0.0
- old
+ new
@@ -15,11 +15,12 @@
def smartquotes_cleanup(xmldoc)
return super if @smartquotes
xmldoc.traverse do |n|
next unless n.text?
- n.replace(n.text.gsub(/\u2019|\u2018|\u201a|\u201b/, "'").
- gsub(/\u201c|\u201d|\u201e|\u201f/, '"'))
+ n.replace(HTMLEntities.new.encode(
+ n.text.gsub(/\u2019|\u2018|\u201a|\u201b/, "'").
+ gsub(/\u201c|\u201d|\u201e|\u201f/, '"'), :basic))
end
xmldoc
end
def termdef_cleanup(xmldoc)