Skip to content

Commit

Permalink
fix(core): remove overstruck diacritics from sanitized strings
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Dec 15, 2020
1 parent fab8061 commit 7da4bc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SoObjects/SOGo/NSString+Utilities.m
Expand Up @@ -310,7 +310,8 @@ - (NSString *) safeString
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))
{
Expand Down Expand Up @@ -436,7 +437,7 @@ - (NSString *) jsonRepresentation
NSString *cleanedString;

// Escape double quotes and remove control characters
cleanedString = [[self doubleQuotedString] safeString];
cleanedString = [[self safeString] doubleQuotedString];
return cleanedString;
}

Expand Down

0 comments on commit 7da4bc4

Please sign in to comment.