Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

auto_link fails to recognize urls separated by space

#72
>> helper.auto_link("http://test.org/ http://test.org/ http://test.org/")
=> "<a href=\"http://test.org/\">http://test.org/</a> http://test.org/ <a href=\"http://test.org/\">http://test.org/</a>"

Expected:

>> helper.auto_link("http://test.org/ http://test.org/ http://test.org/")
=> "<a href=\"http://test.org/\">http://test.org/</a> <a href=\"http://test.org/\">http://test.org/</a> <a href=\"http://test.org/\">http://test.org/</a>"

Reported by Eugene Pimenov · May 1st, 2008 @ 06:12 AM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. Eugene Pimenov
    Eugene Pimenov

    Hehe, lighthouse also triggers this bug:

    http://test.org http://test.org http://test.org

    May 1st, 2008 @ 06:04 AM

  2. Eugene Pimenov
  3. Eugene Pimenov
  4. Samsonov Ivan
  5. Eugene Pimenov
    Eugene Pimenov

    patch is not working for

    May 10th, 2008 @ 05:20 PM

  6. Eugene Pimenov
    Eugene Pimenov

    <a href="…"><img src="…"></a>

    May 10th, 2008 @ 05:19 PM

  7. Repository
    Repository
    • State changed from new to resolved

    (from [150717344aa5c6d8f46fc67de39d6947553ac286]) auto_link helper fails to recognize links separated by space. [#72 state:resolved]

    Signed-off-by: Pratik Naik

    http://github.com/rails/rails/co...

    May 16th, 2008 @ 01:03 PM

  8. Eugene Pimenov
    Eugene Pimenov

    nooooo =)

    This version breaks another thing:

    <a href="some url here">test;</a>

    May 16th, 2008 @ 10:12 PM

  9. Pratik
    Pratik
    • State changed from resolved to open

    Do you have a failing test for that ? Feel free to catch me in #rails-contrib irc channel.

    Thanks

    May 16th, 2008 @ 10:11 PM

  10. Kevin Glowacz
    Kevin Glowacz
    • State changed from open to resolved

    Here is a failing test for what (what I think) Eugene was talking about:

    assert_equal '<a href="http://google.com">Google</a>', auto_link('<a href="http://google.com">Google</a>')
    

    May 22nd, 2008 @ 05:59 PM

  11. Kevin Glowacz
    Kevin Glowacz

    I have no idea why it just marked this as resolved with my last comment.

    May 22nd, 2008 @ 06:02 PM

  12. Pratik
    Pratik
    • State changed from resolved to open

    May 22nd, 2008 @ 07:43 PM

  13. Kevin Glowacz
    Kevin Glowacz

    here is a patch that fixes the original bug but doesn't break already linked urls

    May 22nd, 2008 @ 08:32 PM

  14. Pratik
    Pratik

    Thanks for the patch Kevin.

    May 22nd, 2008 @ 09:12 PM

  15. Repository
    Repository
    • State changed from open to resolved

    (from [1a73e98660b29a2ce9eccd5b0776367a4969a012]) Fix auto_link helper for already linked urls. [#72 state:resolved]

    Signed-off-by: Pratik Naik

    http://github.com/rails/rails/co...

    May 22nd, 2008 @ 09:12 PM