diff --git a/app/router/Route.php b/app/router/Route.php index c3e651b..6a4876b 100644 --- a/app/router/Route.php +++ b/app/router/Route.php @@ -39,7 +39,7 @@ class Route for ($i = 0; $i < $cnt; $i++) { if (substr($parts[$i], 0, 1) == ':') { - $this->params[substr($parts[$i], 1)] = $request[$i]; + $this->params[substr($parts[$i], 1)] = urldecode($request[$i]); } elseif (substr($parts[$i], 0, 2) == '(?') { $match = array(); if (!preg_match('#^' . $parts[$i] . '$#iu', $request[$i], $match)) { @@ -47,7 +47,7 @@ class Route } $start = strpos($parts[$i], '<') + 1; $key = substr($parts[$i], $start, strpos($parts[$i], '>', $start) - $start); - $this->params[$key] = $match[$key]; + $this->params[$key] = urldecode($match[$key]); } elseif ($parts[$i] != $request[$i]) { return false; }