diff --git a/app/Support/Request/ConvertsDataTypes.php b/app/Support/Request/ConvertsDataTypes.php index 978a969760..f1a3ebcf09 100644 --- a/app/Support/Request/ConvertsDataTypes.php +++ b/app/Support/Request/ConvertsDataTypes.php @@ -141,7 +141,7 @@ trait ConvertsDataTypes $string = str_replace($secondSearch, '', $string); // clear zalgo text (TODO also in API v2) - $string = preg_replace('/\pM/u', '', $string); + $string = preg_replace('/(\pM{2})\pM+/u', '\1', $string); if (null === $string) { return null; } diff --git a/app/Support/Steam.php b/app/Support/Steam.php index adcc6dd775..ab882b2ac0 100644 --- a/app/Support/Steam.php +++ b/app/Support/Steam.php @@ -423,7 +423,7 @@ class Steam ]; // clear zalgo text - $string = preg_replace('/\pM/u', '', $string); + $string = preg_replace('/(\pM{2})\pM+/u', '\1', $string); return str_replace($search, '', $string); }