From c31429a5d5f0f6f5ca167d294d9c3593a21e90a8 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Tue, 27 May 2014 08:45:00 -0400 Subject: [PATCH] Also include the BS character in non-safe ones. --- SoObjects/SOGo/NSString+Utilities.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index 25a9c403d..8d26d34a3 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -46,7 +46,7 @@ static NSString **cssEscapingStrings = NULL; static unichar *cssEscapingCharacters = NULL; static int cssEscapingCount; -static unichar thisCharCode[29]; +static unichar thisCharCode[30]; static NSString *controlCharString = nil; static NSCharacterSet *controlCharSet = nil; @@ -285,8 +285,8 @@ static NSCharacterSet *controlCharSet = nil; int i, j; // Create an array of chars for all control characters between 0x00 and 0x1F, - // apart from \t, \n, \f and \r (0x08, 0x09, 0x0A, 0x0C and 0x0D) - for (i = 0, j = 0x00; j < 0x08; i++, j++) { + // apart from \t, \n, \f and \r (0x09, 0x0A, 0x0C and 0x0D) + for (i = 0, j = 0x00; j <= 0x08; i++, j++) { thisCharCode[i] = j; } thisCharCode[i++] = 0x0B;