Fix UTF-8 in headers

This commit is contained in:
bootstraponline
2012-11-29 22:05:29 -07:00
parent 31a95e81b3
commit 57587dafbe
+5 -1
View File
@@ -126,7 +126,11 @@ module Gollum
node.add_child(%Q{<a href="##{h_name}">#{h.content}</a>})
tail.add_child(node)
end
toc = toc.to_xml(@to_xml) if toc != nil
if toc != nil
# convert to HTML first before XHTML
toc = Nokogiri::HTML::fragment toc.to_s
toc = toc.to_xhtml(:encoding => 'UTF-8')
end
[doc, toc]
end