mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Remove CGI.escape in function of Rack::Mount.escape
This commit is contained in:
parent
e55d70a380
commit
0cf190001e
3 changed files with 8 additions and 8 deletions
|
@ -130,7 +130,7 @@ module ActionController
|
||||||
end
|
end
|
||||||
trailing_slash = options.delete(:trailing_slash) if options.key?(:trailing_slash)
|
trailing_slash = options.delete(:trailing_slash) if options.key?(:trailing_slash)
|
||||||
url << ActionController::Base.relative_url_root.to_s unless options[:skip_relative_url_root]
|
url << ActionController::Base.relative_url_root.to_s unless options[:skip_relative_url_root]
|
||||||
anchor = "##{CGI.escape options.delete(:anchor).to_param.to_s}" if options[:anchor]
|
anchor = "##{Rack::Utils.escape options.delete(:anchor).to_param.to_s}" if options[:anchor]
|
||||||
generated = Routing::Routes.generate(options, {})
|
generated = Routing::Routes.generate(options, {})
|
||||||
url << (trailing_slash ? generated.sub(/\?|\z/) { "/" + $& } : generated)
|
url << (trailing_slash ? generated.sub(/\?|\z/) { "/" + $& } : generated)
|
||||||
url << anchor if anchor
|
url << anchor if anchor
|
||||||
|
@ -172,7 +172,7 @@ module ActionController
|
||||||
path = rewrite_path(options)
|
path = rewrite_path(options)
|
||||||
rewritten_url << ActionController::Base.relative_url_root.to_s unless options[:skip_relative_url_root]
|
rewritten_url << ActionController::Base.relative_url_root.to_s unless options[:skip_relative_url_root]
|
||||||
rewritten_url << (options[:trailing_slash] ? path.sub(/\?|\z/) { "/" + $& } : path)
|
rewritten_url << (options[:trailing_slash] ? path.sub(/\?|\z/) { "/" + $& } : path)
|
||||||
rewritten_url << "##{CGI.escape(options[:anchor].to_param.to_s)}" if options[:anchor]
|
rewritten_url << "##{Rack::Utils.escape(options[:anchor].to_param.to_s)}" if options[:anchor]
|
||||||
|
|
||||||
rewritten_url
|
rewritten_url
|
||||||
end
|
end
|
||||||
|
@ -195,7 +195,7 @@ module ActionController
|
||||||
|
|
||||||
def rewrite_authentication(options)
|
def rewrite_authentication(options)
|
||||||
if options[:user] && options[:password]
|
if options[:user] && options[:password]
|
||||||
"#{CGI.escape(options.delete(:user))}:#{CGI.escape(options.delete(:password))}@"
|
"#{Rack::Utils.escape(options.delete(:user))}:#{Rack::Utils.escape(options.delete(:password))}@"
|
||||||
else
|
else
|
||||||
""
|
""
|
||||||
end
|
end
|
||||||
|
|
|
@ -524,7 +524,7 @@ module ActionDispatch
|
||||||
|
|
||||||
fix_content = lambda do |node|
|
fix_content = lambda do |node|
|
||||||
# Gets around a bug in the Rails 1.1 HTML parser.
|
# Gets around a bug in the Rails 1.1 HTML parser.
|
||||||
node.content.gsub(/<!\[CDATA\[(.*)(\]\]>)?/m) { CGI.escapeHTML($1) }
|
node.content.gsub(/<!\[CDATA\[(.*)(\]\]>)?/m) { Rack::Utils.escapeHTML($1) }
|
||||||
end
|
end
|
||||||
|
|
||||||
selected = elements.map do |element|
|
selected = elements.map do |element|
|
||||||
|
|
|
@ -461,10 +461,10 @@ module ActionView
|
||||||
|
|
||||||
string = ''
|
string = ''
|
||||||
extras = ''
|
extras = ''
|
||||||
extras << "cc=#{CGI.escape(cc).gsub("+", "%20")}&" unless cc.nil?
|
extras << "cc=#{Rack::Utils.escape(cc).gsub("+", "%20")}&" unless cc.nil?
|
||||||
extras << "bcc=#{CGI.escape(bcc).gsub("+", "%20")}&" unless bcc.nil?
|
extras << "bcc=#{Rack::Utils.escape(bcc).gsub("+", "%20")}&" unless bcc.nil?
|
||||||
extras << "body=#{CGI.escape(body).gsub("+", "%20")}&" unless body.nil?
|
extras << "body=#{Rack::Utils.escape(body).gsub("+", "%20")}&" unless body.nil?
|
||||||
extras << "subject=#{CGI.escape(subject).gsub("+", "%20")}&" unless subject.nil?
|
extras << "subject=#{Rack::Utils.escape(subject).gsub("+", "%20")}&" unless subject.nil?
|
||||||
extras = "?" << extras.gsub!(/&?$/,"") unless extras.empty?
|
extras = "?" << extras.gsub!(/&?$/,"") unless extras.empty?
|
||||||
|
|
||||||
email_address = email_address.to_s
|
email_address = email_address.to_s
|
||||||
|
|
Loading…
Reference in a new issue