From 8e8fa09a09152eb5a7bd749f58472fa385d11bbc Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 7 Apr 2020 14:17:36 +0200 Subject: apply nazi-id-string-filter to tags fix #83 --- app/class/Page.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/class/Page.php') diff --git a/app/class/Page.php b/app/class/Page.php index d936671..6eb6473 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -413,6 +413,8 @@ class Page extends Dbitem $tag = $this->tagtoarray($tag); } if (is_array($tag)) { + $tag = array_map('idclean', $tag); + $tag = array_filter($tag); $this->tag = $tag; } } @@ -786,6 +788,8 @@ class Page extends Dbitem $tag = $this->tagtoarray($tag); } if(is_array($tag)) { + $tag = array_map('idclean', $tag); + $tag = array_filter($tag); $this->tag = array_unique(array_merge($this->tag, $tag)); } } @@ -803,7 +807,6 @@ class Page extends Dbitem private function tagtoarray(string $tagstring) : array { $tag = strip_tags(trim(strtolower($tagstring))); - $tag = str_replace('*', '', $tag); $tag = str_replace(' ', '', $tag); $taglist = explode(",", $tag); $taglist = array_filter($taglist); -- cgit v1.2.3