diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-19 16:43:16 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-19 16:43:16 -0700 |
commit | dc2e3ea8c41677cdb0177a74f11a08eccc5f3554 (patch) | |
tree | 66dec857d561714312d4e7ec45b2029968b124a6 | |
parent | 62d1b330c408813f8115d9e40e24f7801a718444 (diff) | |
download | rails-dc2e3ea8c41677cdb0177a74f11a08eccc5f3554.tar.gz rails-dc2e3ea8c41677cdb0177a74f11a08eccc5f3554.tar.bz2 rails-dc2e3ea8c41677cdb0177a74f11a08eccc5f3554.zip |
fix escaping in generation
-rw-r--r-- | actionpack/lib/action_dispatch/journey/visitors.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/journey/visitors.rb b/actionpack/lib/action_dispatch/journey/visitors.rb index 3bee8ec5e0..616c2d26d4 100644 --- a/actionpack/lib/action_dispatch/journey/visitors.rb +++ b/actionpack/lib/action_dispatch/journey/visitors.rb @@ -144,12 +144,18 @@ module ActionDispatch node.children.map { |c| visit(c) }.join end + def visit_STAR(node) + if value = options[node.left.to_sym] + escape_path(value) + end + end + def visit_SYMBOL(node) key = node.to_sym if value = options[key] consumed[key] = value - Router::Utils.escape_path(value) + key == :controller ? escape_path(value) : escape_segment(value) else "\0" end |