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.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index d69c862989..8673412401 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -245,12 +245,15 @@ module ActionController
start = "(#{start})" unless /^\w+$/ =~ start
value_expr = "#{g.path_name}[#{start}..-1] || []"
- g.result key, "ActionController::Routing::PathComponent::Result.new(#{value_expr})"
+ g.result key, "ActionController::Routing::PathComponent::Result.new_escaped(#{value_expr})"
g.finish(false)
end
class Result < ::Array
def to_s() join '/' end
+ def self.new_escaped(strings)
+ new strings.collect {|str| CGI.unescape str}
+ end
end
end