Merge pull request #22 from plaidfluff/master
Add support for protocol-relative URLs
This commit is contained in:
commit
fdebed0ba2
|
@ -4800,6 +4800,9 @@
|
||||||
return $rel_url;
|
return $rel_url;
|
||||||
} else if (strpos($rel_url, "://") !== false) {
|
} else if (strpos($rel_url, "://") !== false) {
|
||||||
return $rel_url;
|
return $rel_url;
|
||||||
|
} else if (strpos($rel_url, "//") === 0) {
|
||||||
|
# protocol-relative URL (rare but they exist)
|
||||||
|
return $rel_url;
|
||||||
} else if (strpos($rel_url, "/") === 0)
|
} else if (strpos($rel_url, "/") === 0)
|
||||||
{
|
{
|
||||||
$parts = parse_url($url);
|
$parts = parse_url($url);
|
||||||
|
|
Loading…
Reference in New Issue