aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers/url_helper.rb
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2013-08-03 09:10:27 -0400
committerArun Agrawal <arunagw@gmail.com>2013-08-03 09:10:27 -0400
commita6dab95eb82b5029d94da1abb60fd3c492767645 (patch)
tree48a419e9cc12af9b0ccb2faac724a183f936dd28 /actionview/lib/action_view/helpers/url_helper.rb
parent71f512646a447e4b15c613d35842728e6b8dddb1 (diff)
downloadrails-a6dab95eb82b5029d94da1abb60fd3c492767645.tar.gz
rails-a6dab95eb82b5029d94da1abb60fd3c492767645.tar.bz2
rails-a6dab95eb82b5029d94da1abb60fd3c492767645.zip
Using URI.parser.unescape
Fixes warning warning: URI.unescape is obsolete
Diffstat (limited to 'actionview/lib/action_view/helpers/url_helper.rb')
-rw-r--r--actionview/lib/action_view/helpers/url_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/url_helper.rb b/actionview/lib/action_view/helpers/url_helper.rb
index db0fb40336..1920a94567 100644
--- a/actionview/lib/action_view/helpers/url_helper.rb
+++ b/actionview/lib/action_view/helpers/url_helper.rb
@@ -528,13 +528,13 @@ module ActionView
return false unless request.get? || request.head?
- url_string = URI.unescape(url_for(options)).force_encoding(Encoding::BINARY)
+ url_string = URI.parser.unescape(url_for(options)).force_encoding(Encoding::BINARY)
# We ignore any extra parameters in the request_uri if the
# submitted url doesn't have any either. This lets the function
# work with things like ?order=asc
request_uri = url_string.index("?") ? request.fullpath : request.path
- request_uri = URI.unescape(request_uri).force_encoding(Encoding::BINARY)
+ request_uri = URI.parser.unescape(request_uri).force_encoding(Encoding::BINARY)
if url_string =~ /^\w+:\/\//
url_string == "#{request.protocol}#{request.host_with_port}#{request_uri}"