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/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 push move_string in to move 2014-04-01 15:58:42 -07:00
nfa Replace map.flatten with flat_map in actionpack 2014-03-03 19:23:12 -08:00
nodes update AD::Journey to follow Rails coding conventions 2012-12-20 15:42:39 -05:00
path Replace map.flatten with flat_map in actionpack 2014-03-03 19:23:12 -08:00
router Make URL escaping more consistent 2014-04-20 10:11:38 +01:00
visualizer Integrate Journey into Action Dispatch 2012-12-19 22:13:08 +00:00
backwards.rb :nodoc: Journey because is not part of the public API [ci skip] 2012-12-19 19:24:25 -05:00
formatter.rb Replace map.flatten(1) with flat_map 2014-02-28 22:46:25 -08:00
parser.rb Spelling and Grammar checks 2013-12-12 18:28:34 +05:30
parser.y add missing semicolon to journey parser.y 2013-04-30 13:43:59 -05:00
parser_extras.rb update AD::Journey to follow Rails coding conventions 2012-12-20 15:42:39 -05:00
route.rb Make URL escaping more consistent 2014-04-20 10:11:38 +01:00
router.rb do not create memo objects since we'll just throw them away 2014-04-01 15:55:48 -07:00
routes.rb Clear named routes when routes.rb is reloaded 2013-07-21 17:11:52 +01:00
scanner.rb update AD::Journey to follow Rails coding conventions 2012-12-20 15:42:39 -05:00
visitors.rb Make URL escaping more consistent 2014-04-20 10:11:38 +01:00