aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2015-02-20 21:46:21 +0100
committerArthurHoaro <arthur@hoa.ro>2015-02-20 21:46:21 +0100
commitf81139c9b22acb10be803165604a58f821be8f76 (patch)
tree8135ccbf174fb0d29bfd79385ed42b406aed936d
parentbe3f0b4ec361f63a6fa4ed8291c912c9a426cd16 (diff)
downloadShaarli-f81139c9b22acb10be803165604a58f821be8f76.tar.gz
Shaarli-f81139c9b22acb10be803165604a58f821be8f76.tar.zst
Shaarli-f81139c9b22acb10be803165604a58f821be8f76.zip
Fixes shaarli/Shaarli#46: allow 'javascript:' links sharing
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index dfebdcad..c87b9449 100644
--- a/index.php
+++ b/index.php
@@ -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));