Permalink
Browse files

Merge pull request #11724 from arunagw/warning-removed-ap

Using URI.parser.unescape to avoid warnings
  • Loading branch information...
2 parents 2428580 + 64ce091 commit 5ab91265353deec3c59b81a3645994851c5c9245 @senny senny committed Aug 3, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_view/helpers/url_helper.rb
@@ -528,13 +528,13 @@ def current_page?(options)
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}"

0 comments on commit 5ab9126

Please sign in to comment.