diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-06 00:33:17 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-06 00:33:17 +0100 |
commit | 0cf190001e9b03f40f615736779eedb30a1f2b7a (patch) | |
tree | 34179d1b747da2b7de565c290778519bf41b07db /actionpack/lib/action_controller/url_rewriter.rb | |
parent | e55d70a380a8d7408cc495086ff49af6c6e406d0 (diff) | |
download | rails-0cf190001e9b03f40f615736779eedb30a1f2b7a.tar.gz rails-0cf190001e9b03f40f615736779eedb30a1f2b7a.tar.bz2 rails-0cf190001e9b03f40f615736779eedb30a1f2b7a.zip |
Remove CGI.escape in function of Rack::Mount.escape
Diffstat (limited to 'actionpack/lib/action_controller/url_rewriter.rb')
-rw-r--r-- | actionpack/lib/action_controller/url_rewriter.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb index 52b66c9303..80285b07f5 100644 --- a/actionpack/lib/action_controller/url_rewriter.rb +++ b/actionpack/lib/action_controller/url_rewriter.rb @@ -130,7 +130,7 @@ module ActionController end 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] - 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, {}) url << (trailing_slash ? generated.sub(/\?|\z/) { "/" + $& } : generated) url << anchor if anchor @@ -172,7 +172,7 @@ module ActionController path = rewrite_path(options) 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 << "##{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 end @@ -195,7 +195,7 @@ module ActionController def rewrite_authentication(options) 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 "" end |