Support protocol-relative URLs

This commit is contained in:
fluffy 2012-07-22 09:26:29 -07:00
parent 445313bade
commit f9052d35ac
1 changed files with 3 additions and 0 deletions

View File

@ -4800,6 +4800,9 @@
return $rel_url;
} else if (strpos($rel_url, "://") !== false) {
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)
{
$parts = parse_url($url);