diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index 5cbc74d97..0c8f38c14 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -437,6 +437,10 @@ static int cssEscapingCount; break; } default: + /* U+FFFE and U+FFFF are not allowed in XML, not even as a + character reference: drop them */ + if (chars[i] == 0xFFFE || chars[i] == 0xFFFF) + break; /* escape big chars */ if (chars[i] > 127) {