diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-15 22:10:20 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-09-15 22:10:20 +0000 |
commit | 148202d401c7114c8ceb69f4f9effaba38461124 (patch) | |
tree | 96c82f80fa050467b83785edffe1c8afb3104d43 /actionpack/lib/action_controller/routing_optimisation.rb | |
parent | 3f29043f456af423c4ec7599040625c87321aa77 (diff) | |
download | rails-148202d401c7114c8ceb69f4f9effaba38461124.tar.gz rails-148202d401c7114c8ceb69f4f9effaba38461124.tar.bz2 rails-148202d401c7114c8ceb69f4f9effaba38461124.zip |
Fixed optimized route segment escaping. Closes #9562.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7487 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/routing_optimisation.rb')
-rw-r--r-- | actionpack/lib/action_controller/routing_optimisation.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/routing_optimisation.rb b/actionpack/lib/action_controller/routing_optimisation.rb index 1b447b17e7..eaff1869dd 100644 --- a/actionpack/lib/action_controller/routing_optimisation.rb +++ b/actionpack/lib/action_controller/routing_optimisation.rb @@ -56,7 +56,6 @@ module ActionController elements = [] idx = 0 - if kind == :url elements << '#{request.protocol}' elements << '#{request.host_with_port}' @@ -67,10 +66,10 @@ module ActionController # we don't include the trailing slashes, so skip them. ((route.segments.size == 1 && kind == :path) ? route.segments : route.segments[0..-2]).each do |segment| if segment.is_a?(DynamicSegment) - elements << "\#{URI.escape(args[#{idx}].to_param, ActionController::Routing::Segment::UNSAFE_PCHAR)}" + elements << segment.interpolation_chunk("args[#{idx}].to_param") idx += 1 else - elements << segment.to_s + elements << segment.interpolation_chunk end end %("#{elements * ''}") |