diff --git a/Classes/Blocker.php b/Classes/Blocker.php index ce8ed49..d4402eb 100644 --- a/Classes/Blocker.php +++ b/Classes/Blocker.php @@ -130,7 +130,7 @@ public function badWords() if ($this->strict) { return str_contains(strtolower($this->text), strtolower($value['word'])); } - return in_array($value['word'], $words); + return in_array(strtolower($value['word']), $words); })->map(function ($value) { return [ 'language' => $value['language'], @@ -153,7 +153,7 @@ public function filter() return (str_contains(strtolower($value), $bad_words)) ? $this->blockWord($value) : $value; } - return in_array($value, $bad_words) ? $this->blockWord($value) : $value; + return in_array(strtolower($value), $bad_words) ? $this->blockWord($value) : $value; })->implode(' '); }