This project is archived and is in readonly mode.
Make auto_link accept parentheses in URLs
Reported by Adam Traver | May 21st, 2008 @ 09:25 PM
Currently, the regular expression used in auto_link_urls and, by association, auto_link, does not allow for parentheses in URLs.
While this is not a very common occurrence (nor proper, I don't believe, but I could be wrong), there are certain highly populated sites that use this format. Take Wikipedia, for instance:
http://en.wikipedia.org/wiki/Spr...(computer_graphics)
With the current implementation of auto_link, the link you get back looks like this:
<a href="http://en.wikipedia.org/wiki/Sprite_">http://en.wikipedia.org/wiki/Spr...</a>(computer_graphics)
This patch adds both opening and closing parentheses to the list of allowable characters for the path in the AUTO_LINK_RE regular expression.
P.S. This is my first submission, so if I've done anything wrong in the patch/ticket creation process, please don't freak out. :-p
Comments and changes to this ticket
-
Ryan Bates May 21st, 2008 @ 11:51 PM
+1, tested patch and looks good. Nice job on your first submission!
-
Repository May 22nd, 2008 @ 11:33 AM
- State changed from new to resolved
(from [314e556e6fb7278e37f6105fedbe5fc51f7f848a]) Parentheses should be acceptable characters for auto_link_urls. [#234 state:resolved]
Signed-off-by: Pratik Naik
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>