From 7da4bc465f1a87a7543fc355aa251caf1324483b Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 15 Dec 2020 14:45:46 -0500 Subject: [PATCH] fix(core): remove overstruck diacritics from sanitized strings --- SoObjects/SOGo/NSString+Utilities.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index d1facda78..ee9ba64bb 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -310,7 +310,8 @@ static int cssEscapingCount; c == 0x9 || c == 0xA || c == 0xD || - (c >= 0x20 && c <= 0xD7FF) || + (c >= 0x20 && c < 0x334) || // Skip overstruck diacritics + (c > 0x338 && c < 0xD7FF) || (c >= 0xE000 && c <= 0xFFFD) || (c >= (wchar_t)0x10000 && c <= (wchar_t)0x10FFFF)) { @@ -436,7 +437,7 @@ static int cssEscapingCount; NSString *cleanedString; // Escape double quotes and remove control characters - cleanedString = [[self doubleQuotedString] safeString]; + cleanedString = [[self safeString] doubleQuotedString]; return cleanedString; }