aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index e1ad27fc3a..0b8d9c0a73 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -502,7 +502,7 @@ module ActionController
hangon = (default ? "|| #{default.inspect}" : "if match[#{next_capture}]")
# All non code-related keys (such as :id, :slug) have to be unescaped as other CGI params
- "params[:#{key}] = match[#{next_capture}] && CGI.unescape(match[#{next_capture}]) #{hangon}"
+ "params[:#{key}] = match[#{next_capture}] #{hangon}"
end
def optionality_implied?
@@ -991,6 +991,7 @@ module ActionController
end
def recognize_path(path, environment={})
+ path = CGI.unescape(path)
routes.each do |route|
result = route.recognize(path, environment) and return result
end