Commit ef39fb0b authored by http://jneen.net/'s avatar http://jneen.net/

unwrap all links with no href

parent d866c776
......@@ -17,6 +17,13 @@ module Gitlab
def filter_replies!
document.xpath('//blockquote').each(&:remove)
document.xpath('//table').each(&:remove)
# bogus links with no href are sometimes added by outlook,
# and can result in Html2Text adding extra square brackets
# to the text, so we unwrap them here.
document.xpath('//a[not(@href)]').each do |link|
link.replace(link.children)
end
end
def filtered_html
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment