From d526efa501d1067fe51a37beefeb202bc58a1c7e Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 7 Dec 2017 16:07:25 -0500 Subject: [PATCH] Remove null characters from JSON responses --- NEWS | 1 + SoObjects/SOGo/NSString+Utilities.m | 1 + 2 files changed, 2 insertions(+) diff --git a/NEWS b/NEWS index 32adff4cb..4ed4d04d6 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ Bug fixes - [web] restore messages selection after automatic refresh (#4330) - [web] fixed path of destination mailbox in Sieve filter editor - [web] force copy of dragged contacts from global address books + - [web] removed null characters from JSON responses - [eas] hebrew folders encoding problem using EAS (#4240) - [eas] avoid sync requests for shared folders every second (#4275) diff --git a/SoObjects/SOGo/NSString+Utilities.m b/SoObjects/SOGo/NSString+Utilities.m index 35da33b9c..ca39ec9ca 100644 --- a/SoObjects/SOGo/NSString+Utilities.m +++ b/SoObjects/SOGo/NSString+Utilities.m @@ -264,6 +264,7 @@ static int cssEscapingCount; [representation replaceString: @"\n" withString: @"\\n"]; [representation replaceString: @"\r" withString: @"\\r"]; [representation replaceString: @"\t" withString: @"\\t"]; + [representation replaceString: @"\0" withString: @""]; return representation; }