Merge pull request #22 from plaidfluff/master

Add support for protocol-relative URLs
This commit is contained in:
Andrew Dolgov 2012-07-22 09:32:42 -07:00
commit fdebed0ba2
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);