提交 51c61cfb 编写于 作者: Y Yves Senn

Merge pull request #11735 from arunagw/av-warning-removed-master

Using URI.parser.unescape
......@@ -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}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册