From 0518e3ebf9c3cb3ccde6350ea1918f1a4e320e20 Mon Sep 17 00:00:00 2001 From: Newb I the Newbd Date: Wed, 25 Dec 2019 20:43:14 +0100 Subject: [PATCH] Encode routes to increase compatibility --- system/src/Grav/Framework/Route/Route.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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'])) {