]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Added https to list of authorized protocols.
authorSebastien SAUVAGE <sebsauvage@sebsauvage.net>
Sun, 3 Mar 2013 21:49:10 +0000 (22:49 +0100)
committerSebastien SAUVAGE <sebsauvage@sebsauvage.net>
Sun, 3 Mar 2013 21:49:10 +0000 (22:49 +0100)
index.php

index 224690efeeb97f88e6721e9dec58ae68ab5d4926..222f329587355f84d1bb1ad8af6f7ee345c581d1 100644 (file)
--- 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));