diff options
author | ArthurHoaro <arthur@hoa.ro> | 2015-02-20 21:46:21 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2015-02-20 21:46:21 +0100 |
commit | f81139c9b22acb10be803165604a58f821be8f76 (patch) | |
tree | 8135ccbf174fb0d29bfd79385ed42b406aed936d /index.php | |
parent | be3f0b4ec361f63a6fa4ed8291c912c9a426cd16 (diff) | |
download | Shaarli-f81139c9b22acb10be803165604a58f821be8f76.tar.gz Shaarli-f81139c9b22acb10be803165604a58f821be8f76.tar.zst Shaarli-f81139c9b22acb10be803165604a58f821be8f76.zip |
Fixes shaarli/Shaarli#46: allow 'javascript:' links sharing
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1545,7 +1545,7 @@ function renderPage() | |||
1545 | $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. | 1545 | $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. |
1546 | $linkdate=$_POST['lf_linkdate']; | 1546 | $linkdate=$_POST['lf_linkdate']; |
1547 | $url = trim($_POST['lf_url']); | 1547 | $url = trim($_POST['lf_url']); |
1548 | if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?')) | 1548 | if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:')) |
1549 | $url = 'http://'.$url; | 1549 | $url = 'http://'.$url; |
1550 | $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0), | 1550 | $link = array('title'=>trim($_POST['lf_title']),'url'=>$url,'description'=>trim($_POST['lf_description']),'private'=>(isset($_POST['lf_private']) ? 1 : 0), |
1551 | 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags)); | 1551 | 'linkdate'=>$linkdate,'tags'=>str_replace(',',' ',$tags)); |