diff --git a/mod/parse_url.php b/mod/parse_url.php index cd2263dbe2..7f4bd29a08 100644 --- a/mod/parse_url.php +++ b/mod/parse_url.php @@ -407,6 +407,15 @@ function parse_url_content(&$a) { } } + // add url scheme if missing + $arrurl = parse_url($url); + if (!x($arrurl, 'scheme')) { + if (x($arrurl, 'host')) + $url = "http:".$url; + else + $url = "http://".$url; + } + logger('parse_url: ' . $url); if($textmode) @@ -462,10 +471,7 @@ function parse_url_content(&$a) { $sitedata = ""; - if($siteinfo["title"] == "") { - $sitedata .= sprintf($template,$url,$url,'') . $str_tags; - killme(); - } else { + if($siteinfo["title"] != "") { $text = $siteinfo["text"]; $title = $siteinfo["title"]; }