Skip to content

Commit

Permalink
update using mb_strlen UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
arif-rh committed Oct 4, 2020
1 parent 527ebbb commit 0f5d22c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Check.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0f5d22c

Please sign in to comment.