From 065fd5d9b555d0b85f8958d85fa58ce4feca08f5 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 29 Sep 2014 15:04:40 -0400 Subject: [PATCH] Simplified even more -safeString --- SoObjects/SOGo/NSString+Utilities.m | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index 825f5a934..70fd860ab 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -46,9 +46,6 @@ static NSString **cssEscapingStrings = NULL; static unichar *cssEscapingCharacters = NULL; static int cssEscapingCount; -static NSString *controlCharString = nil; -static NSCharacterSet *controlCharSet = nil; - @implementation NSString (SOGoURLExtension) - (NSString *) composeURLWithAction: (NSString *) action @@ -308,14 +305,9 @@ static NSCharacterSet *controlCharSet = nil; (c >= 0x20 && c <= 0xD7FF) || (c >= 0xE000 && c <= 0xFFFD) || (c >= 0x10000 && c <= 0x10FFFF)) - j++; - else { - if (i+1 < len) - { - buf++; - *(start+j) = *buf; - } + *(start+j) = c; + j++; } buf++;