Skip to content

Commit

Permalink
Fix Windows routing with built-in server (#1502)
Browse files Browse the repository at this point in the history
Strips backward-slashes from Medium.php's and ImageMedium.php's url() method.
  • Loading branch information
OleVik authored and rhukster committed Jun 4, 2017
1 parent 9c0f06e commit ff8a8dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Medium/ImageMedium.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public function url($reset = true)
$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(), '/'), '\\');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion system/src/Grav/Common/Page/Medium/Medium.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ public function url($reset = true)
$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(), '/'), '\\');
}

/**
Expand Down

0 comments on commit ff8a8dd

Please sign in to comment.