1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionpack/lib/action_dispatch
Andrew White 5460591f02 Make URL escaping more consistent
1. Escape '%' characters in URLs - only unescaped data
   should be passed to URL helpers

2. Add an `escape_segment` helper to `Router::Utils`
   that escapes '/' characters

3. Use `escape_segment` rather than `escape_fragment`
   in optimized URL generation

4. Use `escape_segment` rather than `escape_path`
   in URL generation

For point 4 there are two exceptions. Firstly, when a route uses wildcard
segments (e.g. *foo) then we use `escape_path` as the value may contain '/'
characters. This means that wildcard routes can't be optimized. Secondly,
if a `:controller` segment is used in the path then this uses `escape_path`
as the controller may be namespaced.

Fixes #14629, #14636 and #14070.
2014-04-20 10:11:38 +01:00
..
http "subhash" --> "sub-hash" 2014-04-19 04:03:43 +05:30
journey Make URL escaping more consistent 2014-04-20 10:11:38 +01:00
middleware Display diagnostics in text format for xhr request 2014-04-14 20:48:13 +07:00
request Log which keys were set to nil in deep_munge 2014-01-28 20:29:38 +01:00
routing Make URL escaping more consistent 2014-04-20 10:11:38 +01:00
testing Remove surplus period from assertion messages 2014-04-13 11:13:21 +02:00
journey.rb Integrate Journey into Action Dispatch 2012-12-19 22:13:08 +00:00
railtie.rb Add configuration option to optionally disable deep_munge 2013-12-05 12:08:34 +01:00
routing.rb Update documentation to use Rails.application instead 2014-04-13 05:52:04 -05:00