]> git.mxchange.org Git - friendica.git/blobdiff - mod/parse_url.php
Merge pull request #1453 from annando/ddos-with-gprobe
[friendica.git] / mod / parse_url.php
index cd2263dbe2622d8ae532ab87dcce935ac037b916..7f4bd29a08b292728e2c07b3bb0f457c796420c3 100644 (file)
@@ -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"];
        }