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:
Ole Vik
2017-06-04 22:24:29 +02:00
committed by Andy Miller
parent 9c0f06e306
commit ff8a8dde28
2 changed files with 2 additions and 2 deletions

View File

@@ -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(), '/'), '\\');
}
/**

View File

@@ -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(), '/'), '\\');
}
/**