aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthur <arthur@hoa.ro>2015-07-12 11:01:24 +0200
committerArthur <arthur@hoa.ro>2015-07-12 11:01:24 +0200
commit7bd3542b1b030070fa3412a2769f9632bd4e6d1b (patch)
treee2b0bfffec3063025e1872025c805626f3027dc5 /index.php
parentbba021defce15184c986d5e3db138bdbdd4df5d5 (diff)
parent781e8aadea7590dc87b61915b6e65ec52f7d250e (diff)
downloadShaarli-7bd3542b1b030070fa3412a2769f9632bd4e6d1b.tar.gz
Shaarli-7bd3542b1b030070fa3412a2769f9632bd4e6d1b.tar.zst
Shaarli-7bd3542b1b030070fa3412a2769f9632bd4e6d1b.zip
Merge pull request #262 from ArthurHoaro/dup-tags
Avoid tag duplicates
Diffstat (limited to 'index.php')
-rw-r--r--index.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/index.php b/index.php
index d8fb3007..5f173f4d 100644
--- a/index.php
+++ b/index.php
@@ -1380,6 +1380,7 @@ function renderPage()
1380 { 1380 {
1381 if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away! 1381 if (!tokenOk($_POST['token'])) die('Wrong token.'); // Go away!
1382 $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces. 1382 $tags = trim(preg_replace('/\s\s+/',' ', $_POST['lf_tags'])); // Remove multiple spaces.
1383 $tags = implode(' ', array_unique(explode(' ', $tags))); // Remove duplicates.
1383 $linkdate=$_POST['lf_linkdate']; 1384 $linkdate=$_POST['lf_linkdate'];
1384 $url = trim($_POST['lf_url']); 1385 $url = trim($_POST['lf_url']);
1385 if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:')) 1386 if (!startsWith($url,'http:') && !startsWith($url,'https:') && !startsWith($url,'ftp:') && !startsWith($url,'magnet:') && !startsWith($url,'?') && !startsWith($url,'javascript:'))