summaryrefslogtreecommitdiff
path: root/include/functions2.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/functions2.php')
-rw-r--r--include/functions2.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/functions2.php b/include/functions2.php
index 314c12873..e212609db 100644
--- a/include/functions2.php
+++ b/include/functions2.php
@@ -1739,6 +1739,12 @@
* @return string Fixed URL.
*/
function fix_url($url) {
+
+ // support schema-less urls
+ if (strpos($url, '//') === 0) {
+ $url = 'https:' . $url;
+ }
+
if (strpos($url, '://') === false) {
$url = 'http://' . $url;
} else if (substr($url, 0, 5) == 'feed:') {