diff --git a/Http/HttpUtils.php b/Http/HttpUtils.php index cac130ed9..78bfb8547 100644 --- a/Http/HttpUtils.php +++ b/Http/HttpUtils.php @@ -107,7 +107,7 @@ public function checkRequestPath(Request $request, $path) { if ('/' !== $path[0]) { try { - $parameters = $this->router->match($request->getPathInfo()); + $parameters = $this->router->match(urlencode($request->getPathInfo())); return $path === $parameters['_route']; } catch (MethodNotAllowedException $e) { @@ -129,7 +129,7 @@ private function resetLocale(Request $request) } try { - $parameters = $this->router->match($request->getPathInfo()); + $parameters = $this->router->match(urlencode($request->getPathInfo())); if (isset($parameters['_locale'])) { $context->setParameter('_locale', $parameters['_locale']);