From 0f5d22c1cc90d73084215dc75f51c650cd3e95b3 Mon Sep 17 00:00:00 2001 From: Arif RH Date: Mon, 5 Oct 2020 06:30:59 +0700 Subject: [PATCH] update using mb_strlen UTF-8 --- src/Check.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;