diff options
author | Andrew Dolgov <[email protected]> | 2012-07-22 09:32:42 -0700 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2012-07-22 09:32:42 -0700 |
commit | fdebed0ba2012aeb3b5334511d02f72ab271f99b (patch) | |
tree | 0c03f9751f50b04d8335fd1bf7f3de330c505777 | |
parent | 445313bade7ae1b0f88b6c54faaa1c8b00045e6e (diff) | |
parent | f9052d35acb3379b47fd18649b6a37c660ea1bb5 (diff) |
Merge pull request #22 from plaidfluff/master
Add support for protocol-relative URLs
-rw-r--r-- | include/functions.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/functions.php b/include/functions.php index a3de2461d..394f540c9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -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); |