summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2012-07-22 09:32:42 -0700
committerAndrew Dolgov <[email protected]>2012-07-22 09:32:42 -0700
commitfdebed0ba2012aeb3b5334511d02f72ab271f99b (patch)
tree0c03f9751f50b04d8335fd1bf7f3de330c505777 /include
parent445313bade7ae1b0f88b6c54faaa1c8b00045e6e (diff)
parentf9052d35acb3379b47fd18649b6a37c660ea1bb5 (diff)
Merge pull request #22 from plaidfluff/master
Add support for protocol-relative URLs
Diffstat (limited to 'include')
-rw-r--r--include/functions.php3
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);