From cb3ac1a04ffa5a8eeadb4553a73a1ec71abf00e1 Mon Sep 17 00:00:00 2001 From: pzinovkin Date: Fri, 26 Mar 2010 15:47:13 +0000 Subject: [PATCH] params urlencode, #16 git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@136 4cb57b5f-5bbd-dd11-951b-001d605cbbc5 --- app/router/Route.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }