Fix for relative URLs in markdown on installs with no base_url

This commit is contained in:
Andy Miller
2014-11-17 11:14:05 -07:00
parent 376c436318
commit 19fc443518

View File

@@ -113,7 +113,7 @@ trait MarkdownGravLinkTrait
protected function convertUrl($markdown_url)
{
// if absolue and starts with a base_url move on
if ($this->base_url == '' || strpos($markdown_url, $this->base_url) === 0) {
if ($this->base_url != '' && strpos($markdown_url, $this->base_url) === 0) {
$new_url = $markdown_url;
// if its absolute with /
} elseif (strpos($markdown_url, '/') === 0) {