From: fabrixxm Date: Sun, 22 Mar 2015 09:53:24 +0000 (+0100) Subject: Add scheme if missing to url inserted by user in 'insert link' jot X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1cc9e7db0f2b22b66820fd392e6684b43267ba43;p=friendica.git Add scheme if missing to url inserted by user in 'insert link' jot button --- diff --git a/mod/parse_url.php b/mod/parse_url.php index cd2263dbe2..8920878a88 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) @@ -464,7 +473,7 @@ function parse_url_content(&$a) { if($siteinfo["title"] == "") { $sitedata .= sprintf($template,$url,$url,'') . $str_tags; - killme(); + #killme(); } else { $text = $siteinfo["text"]; $title = $siteinfo["title"];