rails/actionpack/test/journey
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
..
gtg Eliminate JSON.{parse,load,generate,dump} and def to_json 2013-11-05 22:26:45 -08:00
nfa Use ActiveSupport::TestCase in the journey tests 2012-12-31 14:40:43 -03:00
nodes Use ActiveSupport::TestCase in the journey tests 2012-12-31 14:40:43 -03:00
path Make ActionDispatch::Journey::Path::Pattern#new raise more meaningful exception message. 2013-02-27 08:26:51 +08:00
route/definition Use ActiveSupport::TestCase in the journey tests 2012-12-31 14:40:43 -03:00
router Make URL escaping more consistent 2014-04-20 10:11:38 +01:00
route_test.rb Change the behavior of route defaults 2013-01-15 17:22:25 +00:00
router_test.rb Make URL escaping more consistent 2014-04-20 10:11:38 +01:00
routes_test.rb Use ActiveSupport::TestCase in the journey tests 2012-12-31 14:40:43 -03:00