Permalink
Browse files

urldecode custom route element values

  • Loading branch information...
1 parent 2f51ef0 commit e6905b44c3d4512b6989c59a1489bc983d88bcdc teddy committed with markstory Feb 18, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Cake/Routing/Route/CakeRoute.php
@@ -221,7 +221,13 @@ public function parse($url) {
}
$route[$key] = $value;
}
-
+
+ foreach ($this->keys as $key) {
+ if (isset($route[$key])) {
+ $route[$key] = rawurldecode($route[$key]);
+ }
+ }
+
if (isset($route['_args_'])) {
list($pass, $named) = $this->_parseArgs($route['_args_'], $route);
$route['pass'] = array_merge($route['pass'], $pass);

0 comments on commit e6905b4

Please sign in to comment.