From: fluffy Date: Sun, 22 Jul 2012 16:26:29 +0000 (-0700) Subject: Support protocol-relative URLs X-Git-Tag: 1.6.0~182^2 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f9052d35acb3379b47fd18649b6a37c660ea1bb5;p=tt-rss.git Support protocol-relative URLs --- diff --git a/include/functions.php b/include/functions.php index a3de2461..394f540c 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);