Add missing rawurlencode() to Pico::getPageUrl()

Replace urldecode() in Pico::evaluateRequestUrl() with rawurldecode()
See #272 for details, thanks @smcdougall for spotting!
This commit is contained in:
Daniel Rudolf 2015-11-08 03:12:18 +01:00
parent e144cce6b1
commit 2ca711ad59

View file

@ -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);
}
/**