From a122dba0ad43fab2240455ff468f4a97919582e0 Mon Sep 17 00:00:00 2001 From: James Cole Date: Wed, 8 Mar 2023 20:40:51 +0100 Subject: [PATCH] Fix https://github.com/firefly-iii/firefly-iii/issues/7172 --- app/Support/Request/ConvertsDataTypes.php | 2 +- app/Support/Steam.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }