Fix #535 and add test

This commit is contained in:
bootstraponline
2012-10-13 13:32:08 -06:00
parent 2246419d1e
commit 56101ed264
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ module Gollum
end
node = Nokogiri::XML::Node.new('li', doc)
# % -> %25 so anchors work on Firefox. See issue #475
node.add_child("<a href='##{id.gsub('%', '%25')}'>#{h.content}</a>")
node.add_child(%Q{<a href="##{id.gsub("%", "%25")}">#{h.content}</a>})
tail.add_child(node)
end
toc = toc.to_xhtml if toc != nil