diff options
author | nodiscc <nodiscc@gmail.com> | 2015-03-11 19:17:13 +0100 |
---|---|---|
committer | nodiscc <nodiscc@gmail.com> | 2015-03-11 19:17:13 +0100 |
commit | 3ef1da28e8cc5afcfe58be067e7e60528ce72f1a (patch) | |
tree | 6c71eac244cd012da06280fd0ad0b395ccebc15d /index.php | |
parent | 33bf8a6f74936fa6d2b9dc8def7f329c828a4fb0 (diff) | |
parent | f81139c9b22acb10be803165604a58f821be8f76 (diff) | |
download | Shaarli-3ef1da28e8cc5afcfe58be067e7e60528ce72f1a.tar.gz Shaarli-3ef1da28e8cc5afcfe58be067e7e60528ce72f1a.tar.zst Shaarli-3ef1da28e8cc5afcfe58be067e7e60528ce72f1a.zip |
Merge pull request #119 from ArthurHoaro/js-link
allow 'javascript:' links sharing (bookmarklets)
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1547,7 +1547,7 @@ function renderPage() | |||
1547 | $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. | 1547 | $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. |
1548 | $linkdate=$_POST['lf_linkdate']; | 1548 | $linkdate=$_POST['lf_linkdate']; |
1549 | $url = trim($_POST['lf_url']); | 1549 | $url = trim($_POST['lf_url']); |
1550 | if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?')) | 1550 | if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:')) |
1551 | $url = 'http://'.$url; | 1551 | $url = 'http://'.$url; |
1552 | $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0), | 1552 | $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0), |
1553 | 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags)); | 1553 | 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags)); |