Permalink
Browse files

fix escaping in generation

  • Loading branch information...
1 parent 62d1b33 commit dc2e3ea8c41677cdb0177a74f11a08eccc5f3554 @tenderlove tenderlove committed May 19, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 actionpack/lib/action_dispatch/journey/visitors.rb
@@ -144,12 +144,18 @@ def nary(node)
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

0 comments on commit dc2e3ea

Please sign in to comment.