summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorfluffy <[email protected]>2012-07-22 09:26:29 -0700
committerfluffy <[email protected]>2012-07-22 09:27:21 -0700
commitf9052d35acb3379b47fd18649b6a37c660ea1bb5 (patch)
tree0c03f9751f50b04d8335fd1bf7f3de330c505777 /include
parent445313bade7ae1b0f88b6c54faaa1c8b00045e6e (diff)
Support 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);