Merge pull request #3614 from klimov-paul/route-url-encode

Route parameter url encoding added
This commit is contained in:
Carsten Brandt
2014-05-28 12:14:29 +02:00
2 changed files with 2 additions and 1 deletions

View File

@@ -36,6 +36,7 @@ Yii Framework 2 Change Log
- Bug #3578: Fixed postgreSQL column type detection, added missing types (MDMunir, cebe)
- Bug #3591: Fix incomplete obsolete filling in i18n `MessageController::saveMessagesToDb()` (advsm)
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
- Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul)
- Enh #2264: `CookieCollection::has()` will return false for expired or removed cookies (qiangxue)
- Enh #2435: `yii\db\IntegrityException` is now thrown on database integrity errors instead of general `yii\db\Exception` (samdark)
- Enh #2837: Error page now shows arguments in stack trace method calls (samdark)

View File

@@ -325,7 +325,7 @@ class UrlManager extends Component
return "$baseUrl/{$route}{$anchor}";
} else {
$url = "$baseUrl?{$this->routeParam}=$route";
$url = "$baseUrl?{$this->routeParam}=" . urlencode($route);
if (!empty($params) && ($query = http_build_query($params)) !== '') {
$url .= '&' . $query;
}