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:
parent
e144cce6b1
commit
2ca711ad59
@ -559,7 +559,7 @@ class Pico
|
|||||||
if (($pathComponentLength = strpos($pathComponent, '&')) !== false) {
|
if (($pathComponentLength = strpos($pathComponent, '&')) !== false) {
|
||||||
$pathComponent = substr($pathComponent, 0, $pathComponentLength);
|
$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)
|
public function getPageUrl($page)
|
||||||
{
|
{
|
||||||
return $this->getBaseUrl() . ((!$this->isUrlRewritingEnabled() && !empty($page)) ? '?' : '') . $page;
|
return $this->getBaseUrl() . ((!$this->isUrlRewritingEnabled() && !empty($page)) ? '?' : '') . rawurlencode($page);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user