This project is archived and is in readonly mode.

#3241 ✓resolved
javan (at javan)

auto_link does not add attributes to hrefs like the docs describe

Reported by javan (at javan) | September 21st, 2009 @ 09:21 PM

This is only a problem with the "new" API for auto_link, the old API works fine. An example from the console:

$ script/console
Loading development environment (Rails 2.3.4)
>> include ActionView::Helpers::TextHelper
=> Object
>> include ActionView::Helpers::TagHelper
=> Object

# The docs say this should work:
>> auto_link("http://google.com", :href_options => { :target => "_blank" })
=> "<a href=\"http://google.com\">http://google.com</a>"

# This works:
>> auto_link("http://google.com", :urls, :target => "_blank")
=> "<a href=\"http://google.com\" target=\"_blank\">http://google.com</a>"

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Tags

Pages