diff --git a/src/Check.php b/src/Check.php index df5440e..7b451eb 100644 --- a/src/Check.php +++ b/src/Check.php @@ -304,7 +304,7 @@ public function cleanWords(string $string, string $replacement = '*') $this->characterExpressions, $this->separatorExpression ); - $string = preg_replace($profanity, str_repeat($replacement, strlen($this->badWordsFound)), $string); + $string = preg_replace($profanity, str_repeat($replacement, mb_strlen($this->badWordsFound, 'UTF-8')), $string); } return $string;