diff --git a/NEWS b/NEWS index c4fe757ea..c8e4a1746 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,7 @@ Bug fixes - simplify searches in the address book (#2187) - warn user when dnd failed because of a resource conflict (#1613) - respect the maximum number of bookings when viewing the freebusy information of a resource (#2560) + - encode HTML entities when forwarding an HTML message inline in plain text composition mode (#2411) 2.1.1b (2013-12-04) ------------------- diff --git a/SoObjects/Mailer/NSString+Mail.m b/SoObjects/Mailer/NSString+Mail.m index 2789c525a..cc8164b1c 100644 --- a/SoObjects/Mailer/NSString+Mail.m +++ b/SoObjects/Mailer/NSString+Mail.m @@ -613,8 +613,7 @@ convertChars (const char *oldString, unsigned int oldLength, unsigned int newLength; utf8String = [self UTF8String]; - newString = convertChars (utf8String, strlen (utf8String), - &newLength); + newString = convertChars (utf8String, strlen (utf8String), &newLength); convertedString = [[NSString alloc] initWithBytes: newString length: newLength encoding: NSUTF8StringEncoding]; diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index 8b0b041fc..1aa24ea5b 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -94,7 +94,7 @@ if (html && !htmlComposition) rc = [raw htmlToText]; else if (!html && htmlComposition) - rc = [raw stringByConvertingCRLNToHTML]; + rc = [[raw stringByEscapingHTMLString] stringByConvertingCRLNToHTML]; else rc = raw; @@ -171,8 +171,8 @@ = [NSArray arrayWithObjects: @"text/plain", @"text/html", nil]; keys = [NSMutableArray array]; [self addRequiredKeysOfStructure: [self bodyStructure] - path: @"" toArray: keys acceptedTypes: acceptedTypes - withPeek: NO]; + path: @"" toArray: keys acceptedTypes: acceptedTypes + withPeek: NO]; return [self _contentForEditingFromKeys: keys]; }