aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2007-12-28 20:59:30 +0000
committerRick Olson <technoweenie@gmail.com>2007-12-28 20:59:30 +0000
commit58cf6df41ac29e59de65e4e9840868a071fc8148 (patch)
treec91034937f5d5e7f1f8b7bfeca45480aa00ae498
parent9e2536393e9a41f53bf543d0ea39a16b96e9bc17 (diff)
downloadrails-58cf6df41ac29e59de65e4e9840868a071fc8148.tar.gz
rails-58cf6df41ac29e59de65e4e9840868a071fc8148.tar.bz2
rails-58cf6df41ac29e59de65e4e9840868a071fc8148.zip
Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [bgreenlee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8506 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb2
-rw-r--r--actionpack/test/template/text_helper_test.rb1
3 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 10f4d93a82..bb310d3792 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fix that auto_link looks for ='s in url paths (Amazon urls have them). Closes #10640 [bgreenlee]
+
* Ensure that test case setup is run even if overridden. #10382 [Josh Peek]
* Fix HTML Sanitizer to allow trailing spaces in CSS style attributes. Closes #10566 [wesley.moxam]
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index e5747f28f7..709b07f381 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -436,7 +436,7 @@ module ActionView
[-\w]+ # subdomain or domain
(?:\.[-\w]+)* # remaining subdomains or domain
(?::\d+)? # port
- (?:/(?:(?:[~\w\+@%-]|(?:[,.;:][^\s$]))+)?)* # path
+ (?:/(?:(?:[~\w\+@%=-]|(?:[,.;:][^\s$]))+)?)* # path
(?:\?[\w\+@%&=.;-]+)? # query string
(?:\#[\w\-]*)? # trailing anchor
)
diff --git a/actionpack/test/template/text_helper_test.rb b/actionpack/test/template/text_helper_test.rb
index 6bfe18123b..16f1e092c2 100644
--- a/actionpack/test/template/text_helper_test.rb
+++ b/actionpack/test/template/text_helper_test.rb
@@ -175,6 +175,7 @@ class TextHelperTest < Test::Unit::TestCase
http://www.rubyonrails.com/~minam/contact;new?with=query&string=params
http://en.wikipedia.org/wiki/Wikipedia:Today%27s_featured_picture_%28animation%29/January_20%2C_2007
http://www.mail-archive.com/rails@lists.rubyonrails.org/
+ http://www.amazon.com/Testing-Equal-Sign-In-Path/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198861734&sr=8-1
)
urls.each do |url|