mirror of
https://github.com/getgrav/grav.git
synced 2026-03-04 19:41:36 +01:00
Fix Windows routing with built-in server (#1502)
Strips backward-slashes from Medium.php's and ImageMedium.php's url() method.
This commit is contained in:
@@ -166,7 +166,7 @@ class ImageMedium extends Medium
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
return Grav::instance()['base_url'] . '/' . ltrim($output . $this->querystring() . $this->urlHash(), '/');
|
||||
return trim(Grav::instance()['base_url'] . '/' . ltrim($output . $this->querystring() . $this->urlHash(), '/'), '\\');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -175,7 +175,7 @@ class Medium extends Data implements RenderableInterface
|
||||
$this->reset();
|
||||
}
|
||||
|
||||
return Grav::instance()['base_url'] . '/' . ltrim($output . $this->querystring() . $this->urlHash(), '/');
|
||||
return trim(Grav::instance()['base_url'] . '/' . ltrim($output . $this->querystring() . $this->urlHash(), '/'), '\\');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user