1
0
mirror of https://github.com/erusev/parsedown.git synced 2023-08-10 21:13:06 +03:00

Fixed relative link compatibility for php 5.3

Moved the parse_url outside the if check for compatibility.
This commit is contained in:
brandon 2016-02-17 11:26:38 -05:00
parent b9daaa2fed
commit 71213e851d

View File

@ -1169,7 +1169,8 @@ class Parsedown
}
$url = $Link['element']['attributes']['href'];
if (isset($this->relativePath) && !isset(parse_url($url)['host']))
$hostURL = parse_url($url);
if (isset($this->relativePath) && !isset($hostURL['host']))
{
$url = $this->relativePath . $url;
}