update getPagePath filter

This commit is contained in:
ghost 2024-01-31 17:34:33 +02:00
parent 8378bac08b
commit 85e83f7f49

View file

@ -34,17 +34,20 @@ class Filesystem
public function getPagePathByUri(string $uri): ?string public function getPagePathByUri(string $uri): ?string
{ {
$uri = urldecode(
$uri
);
$path = sprintf( $path = sprintf(
'%s/pages/%s.txt', '%s/pages/%s.txt',
$this->_path, $this->_path,
str_replace( str_replace(
':', ':',
'/', '/',
$uri trim(
mb_strtolower(
urldecode(
$uri
)
),
':'
)
) )
); );