mirror of
https://github.com/getgrav/grav.git
synced 2025-12-05 15:29:57 +01:00
Added support for spaces in page and media urls
This commit is contained in:
@@ -100,8 +100,9 @@ class Grav extends Container
|
||||
$page = $c['pages']->dispatch($path_parts['dirname']);
|
||||
if ($page) {
|
||||
$media = $page->media()->all();
|
||||
if (isset($media[$path_parts['basename']])) {
|
||||
$medium = $media[$path_parts['basename']];
|
||||
$media_file = urldecode($path_parts['basename']);
|
||||
if (isset($media[$media_file])) {
|
||||
$medium = $media[$media_file];
|
||||
|
||||
// loop through actions for the image and call them
|
||||
foreach ($c['uri']->query(null,true) as $action => $params) {
|
||||
|
||||
@@ -133,7 +133,7 @@ class Uri
|
||||
*/
|
||||
public function route($absolute = false, $domain = false)
|
||||
{
|
||||
return ($absolute ? $this->rootUrl($domain) : '') . '/' . implode('/', $this->paths);
|
||||
return urldecode(($absolute ? $this->rootUrl($domain) : '') . '/' . implode('/', $this->paths));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user