Skip to content

Commit

Permalink
_Trailing_ and $this->keys also do not need to be urldecoded. Both _t…
Browse files Browse the repository at this point in the history
…railing_ 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.
  • Loading branch information
Melvin.Ross@gmail.com committed Jan 24, 2014
1 parent 83f37e4 commit 7f496fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Routing/Route/CakeRoute.php
Expand Up @@ -235,7 +235,7 @@ public function parse($url) {

foreach ($this->keys as $key) {
if (isset($route[$key])) {
$route[$key] = rawurldecode($route[$key]);
$route[$key] = $route[$key];
}
}

Expand All @@ -247,7 +247,7 @@ public function parse($url) {
}

if (isset($route['_trailing_'])) {
$route['pass'][] = rawurldecode($route['_trailing_']);
$route['pass'][] = $route['_trailing_'];
unset($route['_trailing_']);
}

Expand Down

0 comments on commit 7f496fa

Please sign in to comment.