diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2020-04-07 14:17:36 +0200 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2020-04-07 14:17:36 +0200 |
commit | 8e8fa09a09152eb5a7bd749f58472fa385d11bbc (patch) | |
tree | f0da0fd9fcd34879b6364af2059b571091ddc264 /app/class/Page.php | |
parent | b35fca42a08df49dd114dc62b069975d04016c83 (diff) | |
download | wcms-8e8fa09a09152eb5a7bd749f58472fa385d11bbc.tar.gz wcms-8e8fa09a09152eb5a7bd749f58472fa385d11bbc.zip |
apply nazi-id-string-filter to tags
fix #83
Diffstat (limited to 'app/class/Page.php')
-rw-r--r-- | app/class/Page.php | 5 |
1 files changed, 4 insertions, 1 deletions
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); |