malformed HTML - href should be encoded (& -> &)
Opened this issue · 1 comments
Deleted user commented
irb(main):011:0> RailsAutolink::VERSION
=> "1.0.9"
irb(main):010:0> helper.auto_link('http://example.com?one=1&two=2') == '<a href="http://example.com?one=1&two=2">http://example.com?one=1&two=2</a>'
=> false
link_to
in Rails uses href = ERB::Util.html_escape(href)
.
homakov commented
You are right
document.write('<a href="?dsf"dsf">asdf</a>')
& is for HTML entities thus in some cases it can be converted and auto_link is broken. agreed? /cc @tenderlove