Skip to content

Firefly III: a personal finances manager

Fix https://github.com/firefly-iii/firefly-iii/issues/7172

James Colea122dba0ad43
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);
}