From 28ee04b68b7b8e0006235d85f2bd4c5129f830ad Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Mon, 29 Aug 2016 15:01:47 -0400 Subject: [PATCH] (fix) make sure to escape email and all address fields --- ActiveSync/NGVCard+ActiveSync.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ActiveSync/NGVCard+ActiveSync.m b/ActiveSync/NGVCard+ActiveSync.m index 2e2271781..ffabbafb0 100644 --- a/ActiveSync/NGVCard+ActiveSync.m +++ b/ActiveSync/NGVCard+ActiveSync.m @@ -138,7 +138,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. [s appendFormat: @"%@", [o activeSyncRepresentationInContext: context]]; if ((o = [self preferredEMail])) - [s appendFormat: @"%@", o]; + [s appendFormat: @"%@", [o activeSyncRepresentationInContext: context]]; // Secondary email addresses (2 and 3) @@ -148,7 +148,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. { o = [[emails objectAtIndex: i] flattenedValuesForKey: @""]; - [s appendFormat: @"%@", i+2, o, i+2]; + [s appendFormat: @"%@", i+2, [o activeSyncRepresentationInContext: context], i+2]; if (i == 1) break; @@ -181,10 +181,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. a = [NSMutableString string]; if ((o = [homeAdr flattenedValueAtIndex: 2 forKey: @""])) - [a appendString: o]; + [a appendString: [o activeSyncRepresentationInContext: context]]; if ((o = [homeAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length]) - [a appendFormat: @"\n%@", o]; + [a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]]; [s appendFormat: @"%@", [a activeSyncRepresentationInContext: context]]; @@ -212,10 +212,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. a = [NSMutableString string]; if ((o = [workAdr flattenedValueAtIndex: 2 forKey: @""])) - [a appendString: o]; + [a appendString: [o activeSyncRepresentationInContext: context]]; if ((o = [workAdr flattenedValueAtIndex: 1 forKey: @""]) && [o length]) - [a appendFormat: @"\n%@", o]; + [a appendFormat: @"\n%@", [o activeSyncRepresentationInContext: context]]; [s appendFormat: @"%@", [a activeSyncRepresentationInContext: context]];