Support protocol-relative URLs
This commit is contained in:
parent
445313bade
commit
f9052d35ac
|
@ -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