diff --git a/system/src/Grav/Framework/Route/Route.php b/system/src/Grav/Framework/Route/Route.php index 58224fee74..da2713b815 100644 --- a/system/src/Grav/Framework/Route/Route.php +++ b/system/src/Grav/Framework/Route/Route.php @@ -383,10 +383,10 @@ protected function initParts(array $parts) $path = $parts['path'] ?? '/'; if (isset($parts['params'])) { - $this->route = trim(rawurldecode($path), '/'); + $this->route = rawurlencode(trim(rawurldecode($path), '/')); $this->gravParams = $parts['params']; } else { - $this->route = trim(RouteFactory::stripParams($path, true), '/'); + $this->route = rawurlencode(trim(RouteFactory::stripParams($path, true), '/')); $this->gravParams = RouteFactory::getParams($path); } if (isset($parts['query'])) {