]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Merge branch 'cleaner-searchfields' into next
[github/shaarli/Shaarli.git] / index.php
index 83a54f86d08d590c060d2fdc865f00ef40447167..a82c4409ff8709c65965eacf40ce1aa1e296fcd8 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1548,7 +1548,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,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?'))
+        if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:'))
             $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));