X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=index.php;h=d9fe5bc2d9cac9ad917bde90032e9df758ac9444;hb=ce354bf1a61ce2478529ad558b24cdf9678c398a;hp=4382bd808ff9f035c681b9232a6a76b348bea4cd;hpb=21979ff11ceee0042642ac17147858a4155d54c5;p=github%2Fshaarli%2FShaarli.git diff --git a/index.php b/index.php index 4382bd80..d9fe5bc2 100644 --- a/index.php +++ b/index.php @@ -1558,6 +1558,8 @@ function renderPage() } // Remove multiple spaces. $tags = trim(preg_replace('/\s\s+/', ' ', $_POST['lf_tags'])); + // Remove first '-' char in tags. + $tags = preg_replace('/(^| )\-/', '$1', $tags); // Remove duplicates. $tags = implode(' ', array_unique(explode(' ', $tags))); $linkdate = $_POST['lf_linkdate'];