_Trailing_ and $this->keys also do not need to be urldecoded. Both _trailing_ and $this->keys gets set in _writeRoute, which also makes the regex that used to create the array $route.

Any keys in $route that match [_trailing_] or any values in $this->keys are put there through the exection of preg_match. The URL is decoded before being passed to preg_match, which means the values
inside of [_trailing_]etc. have already been decoded.
This commit is contained in:
Melvin.Ross@gmail.com 2014-01-24 17:44:31 -06:00
parent 83f37e48a9
commit 7f496fad94

View file

@ -235,7 +235,7 @@ class CakeRoute {
foreach ($this->keys as $key) {
if (isset($route[$key])) {
$route[$key] = rawurldecode($route[$key]);
$route[$key] = $route[$key];
}
}
@ -247,7 +247,7 @@ class CakeRoute {
}
if (isset($route['_trailing_'])) {
$route['pass'][] = rawurldecode($route['_trailing_']);
$route['pass'][] = $route['_trailing_'];
unset($route['_trailing_']);
}