New code for API 2

This commit is contained in:
Sander Dorigo
2022-06-23 09:33:43 +02:00
parent e0c9d3627e
commit b12d72bef6
13 changed files with 108 additions and 11 deletions

View File

@@ -119,6 +119,9 @@ trait ConvertsDataTypes
$secondSearch = $keepNewlines ? ["\r"] : ["\r", "\n", "\t", "\036", "\025"];
$string = str_replace($secondSearch, '', $string);
// clear zalgo text (TODO also in API v2)
$string = preg_replace('/\pM/u', '', $string);
return trim($string);
}