diff --git a/lib/Pico.php b/lib/Pico.php index 91a6c27..674d526 100644 --- a/lib/Pico.php +++ b/lib/Pico.php @@ -559,7 +559,7 @@ class Pico if (($pathComponentLength = strpos($pathComponent, '&')) !== false) { $pathComponent = substr($pathComponent, 0, $pathComponentLength); } - $this->requestUrl = (strpos($pathComponent, '=') === false) ? urldecode($pathComponent) : ''; + $this->requestUrl = (strpos($pathComponent, '=') === false) ? rawurldecode($pathComponent) : ''; } /** @@ -1187,7 +1187,7 @@ class Pico */ public function getPageUrl($page) { - return $this->getBaseUrl() . ((!$this->isUrlRewritingEnabled() && !empty($page)) ? '?' : '') . $page; + return $this->getBaseUrl() . ((!$this->isUrlRewritingEnabled() && !empty($page)) ? '?' : '') . rawurlencode($page); } /**