Forum: Ruby on Rails auto_link issue with email address inside <a>

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6d2ba55fb8ab68bcd1746441ea91b7a6?d=identicon&s=25 rien (Guest)
on 2009-01-31 21:46
(Received via mailing list)
I think there is a bug in auto_link_email_addresses, if an e-mail
address is already linked.

This works fine:
<% p = "<a href=\"mailto:name@test.com\">name@test.com</a>" %>
<%= auto_link(p) %>

This fails:
<% p = "<a href=\"mailto:name@test.com\">Some Other Text</a>" %>
<%= auto_link(p) %>

And results in:

<a href="mailto:<a href="mailto:rname@test.com">name@test.com</
a>">Some Other Text</a>


Or do I overlook something?
This topic is locked and can not be replied to.