Remove first '-' char when saving tags
This commit is contained in:
parent
21979ff11c
commit
ce354bf1a6
1 changed files with 2 additions and 0 deletions
|
@ -1558,6 +1558,8 @@ function renderPage()
|
||||||
}
|
}
|
||||||
// Remove multiple spaces.
|
// Remove multiple spaces.
|
||||||
$tags = trim(preg_replace('/\s\s+/', ' ', $_POST['lf_tags']));
|
$tags = trim(preg_replace('/\s\s+/', ' ', $_POST['lf_tags']));
|
||||||
|
// Remove first '-' char in tags.
|
||||||
|
$tags = preg_replace('/(^| )\-/', '$1', $tags);
|
||||||
// Remove duplicates.
|
// Remove duplicates.
|
||||||
$tags = implode(' ', array_unique(explode(' ', $tags)));
|
$tags = implode(' ', array_unique(explode(' ', $tags)));
|
||||||
$linkdate = $_POST['lf_linkdate'];
|
$linkdate = $_POST['lf_linkdate'];
|
||||||
|
|
Loading…
Reference in a new issue