From: Sebastien SAUVAGE Date: Sun, 3 Mar 2013 21:49:10 +0000 (+0100) Subject: Added https to list of authorized protocols. X-Git-Tag: v0.0.41beta~6 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=dd064cc315374a419a29391c6ee0d1675d11ef4d;p=github%2Fshaarli%2FShaarli.git Added https to list of authorized protocols. --- diff --git a/index.php b/index.php index 224690ef..222f3295 100644 --- a/index.php +++ b/index.php @@ -1446,7 +1446,7 @@ function renderPage() $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. $linkdate=$_POST['lf_linkdate']; $url = trim($_POST['lf_url']); - if (!startsWith($url,'http:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?')) + if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?')) $url = 'http://'.$url; $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0), 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags));