Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

auto_link view helper was failing on URLs with colons after a query p…

…aram

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1341 state:committed]
  • Loading branch information...
commit d3ec1d3c22904c8801945b56956466f8ead9f3c1 1 parent 32a5cfc
@rmanalan rmanalan authored NZKoz committed
View
4 actionpack/lib/action_view/helpers/text_helper.rb
@@ -559,7 +559,7 @@ def set_cycle(name, cycle_object)
(?:\.[-\w]+)* # remaining subdomains or domain
(?::\d+)? # port
(?:/(?:[~\w\+@%=\(\)-]|(?:[,.;:'][^\s$]))*)* # path
- (?:\?[\w\+@%&=.;-]+)? # query string
+ (?:\?[\w\+@%&=.;:-]+)? # query string
(?:\#[\w\-]*)? # trailing anchor
)
([[:punct:]]|<|$|) # trailing text
@@ -598,4 +598,4 @@ def auto_link_email_addresses(text)
end
end
end
-end
+end
View
1  actionpack/test/template/text_helper_test.rb
@@ -221,6 +221,7 @@ def test_auto_link_parsing
http://www.amazon.com/Testing-Equal-Sign-In-Path/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1198861734&sr=8-1
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
)
urls.each do |url|
Please sign in to comment.
Something went wrong with that request. Please try again.