From b02a4f82a0e080d963d9a0c55027ab7e16f7d432 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 15 Oct 2015 12:51:30 -0400 Subject: [PATCH] (fix) don't escape quoted strings during versit generation --- NEWS | 1 + SOPE/NGCards/NSString+NGCards.m | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/NEWS b/NEWS index 1af9d69df..c06fbc82e 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,7 @@ Bug fixes - numerous EAS fixes when connections are dropped before the EAS client receives the response (#3058, #2849) - correctly handle the References header over EAS (#3365) - make sure English is always used when generating Date headers using EAS (#3356) + - don't escape quoted strings during versit generation 2.3.2 (2015-09-16) ------------------ diff --git a/SOPE/NGCards/NSString+NGCards.m b/SOPE/NGCards/NSString+NGCards.m index 9e851ac2e..02c1c3d0b 100644 --- a/SOPE/NGCards/NSString+NGCards.m +++ b/SOPE/NGCards/NSString+NGCards.m @@ -158,16 +158,31 @@ NSMutableString *string; unsigned int len, i; unichar c; + BOOL isQuoted; len = [self length]; string = [NSMutableString stringWithCapacity: len * 1.5]; + isQuoted = NO; for (i = 0; i < len; i++) { c = [self characterAtIndex: i]; + if (isQuoted) + { + if (c == '"') + isQuoted = NO; + + [string appendFormat: @"%C", c]; + continue; + } + switch (c) { + case '"': + isQuoted = YES; + [string appendFormat: @"%C", c]; + break; case '\\': [string appendString: @"\\\\"]; break;