This project is archived and is in readonly mode.
[PATCH] Autolinking non-http protocols doesn't work
Reported by Zach Brock | November 19th, 2009 @ 07:00 AM
If you redefined the AUTO_LINK_RE to support protocols other than HTTP, bad links are generated. In the auto_link_urls code it checks if there is an http in the generated href and if there isn't it prepends one. If you're using auto_link_urls on, for example, ftp:// links, instead of <a href="ftp://example.com">ftp://example.com</a> , you get <a href="http:// ftp://example.com">ftp://example.com</a>. This patch adds a test and changes the code to check for any protocol instead of just http before prepending the default.
This patch is against the 2-3-stable branch.
Comments and changes to this ticket
-
Zach Brock November 19th, 2009 @ 07:05 AM
- Tag changed from actionview, auto_link, patch, rails, text_helper to 2.3.x, actionview, auto_link, patch, rails, text_helper
-
Zach Brock November 25th, 2009 @ 08:39 AM
Here's a new patch against 2-3-stable that scopes the regex to the beginning of the url
-
Repository January 4th, 2010 @ 09:57 PM
- State changed from new to committed
(from [f32c96eb760abca984b86435f89b7bbc149e78c7]) fixing autolinking other protocols
Signed-off-by: Michael Koziarski michael@koziarski.com
[#3494 state:committed] http://github.com/rails/rails/commit/f32c96eb760abca984b86435f89b7b... -
Repository May 29th, 2010 @ 03:06 AM
- State changed from committed to resolved
(from [bd9ca9aed0b5ab3697a7ae27a53664f3118b132c]) auto_link: support arbitrary URI schemes like "ftp:" and "file:"
recognizes all URI scheme allowed characters, such as colon and period.
[#3494 state:resolved] http://github.com/rails/rails/commit/bd9ca9aed0b5ab3697a7ae27a53664...
-
Repository May 29th, 2010 @ 03:06 AM
(from [133ada6ab0f0cb7bef2bd40dbc18f2d5bc6b964e]) auto_link: support arbitrary URI schemes like "ftp:" and "file:"
recognizes all URI scheme allowed characters, such as colon and period.
[#3494 state:resolved] http://github.com/rails/rails/commit/133ada6ab0f0cb7bef2bd40dbc18f2...
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>
People watching this ticket
Attachments
Referenced by
- 3494 [PATCH] Autolinking non-http protocols doesn't work Signed-off-by: Michael Koziarski michael@koziarski.com [#...
- 3494 [PATCH] Autolinking non-http protocols doesn't work [#3494 state:resolved] http://github.com/rails/rails/com...
- 3494 [PATCH] Autolinking non-http protocols doesn't work [#3494 state:resolved] http://github.com/rails/rails/com...