lib/kramdown/converter/latex.rb in kramdown-1.1.0 vs lib/kramdown/converter/latex.rb in kramdown-1.2.0
- old
+ new
@@ -204,12 +204,12 @@
end
def convert_a(el, opts)
url = el.attr['href']
if url =~ /^#/
- "\\hyperlink{#{url[1..-1]}}{#{inner(el, opts)}}"
+ "\\hyperlink{#{escape(url[1..-1])}}{#{inner(el, opts)}}"
else
- "\\href{#{url}}{#{inner(el, opts)}}"
+ "\\href{#{escape(url)}}{#{inner(el, opts)}}"
end
end
def convert_img(el, opts)
if el.attr['src'] =~ /^(https?|ftps?):\/\//