From 9803fa3ecc1482dc29250ce6208c607427db36c0 Mon Sep 17 00:00:00 2001 From: Rich Manalang Date: Mon, 10 Nov 2008 19:53:44 -0800 Subject: [PATCH] auto_link failed on URLs that have square brackets in the param like this: http://connect.oraclecorp.com/search?search[q]=green+france&search[type]=Group Signed-off-by: Rich Manalang --- actionpack/lib/action_view/helpers/text_helper.rb | 2 +- actionpack/test/template/text_helper_test.rb | 1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 36f7575..b3b90ad 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -559,7 +559,7 @@ module ActionView (?:\.[-\w]+)* # remaining subdomains or domain (?::\d+)? # port (?:/(?:[~\w\+@%=\(\)-]|(?:[,.;:'][^\s$]))*)* # path - (?:\?[\w\+@%&=.;:-]+)? # query string + (?:\?[\w\+@%&=.;:\[\]-]+)? # query string (?:\#[\w\-]*)? # trailing anchor ) ([[:punct:]]|<|$|) # trailing text diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb index 095c952..68b8714 100644 --- a/actionpack/test/template/text_helper_test.rb +++ b/actionpack/test/template/text_helper_test.rb @@ -222,6 +222,7 @@ class TextHelperTest < ActionView::TestCase http://en.wikipedia.org/wiki/Sprite_(computer_graphics) http://en.wikipedia.org/wiki/Texas_hold'em https://www.google.com/doku.php?id=gps:resource:scs:start + http://connect.oraclecorp.com/search?search[q]=green+france&search[type]=Group ) urls.each do |url| -- 1.6.0.2