Encode HTML entities for inline forwards in text

Fixes #2411
pull/17/head
Francis Lachapelle 2014-02-05 11:17:22 -05:00
parent 826537ed01
commit 359b6a99aa
3 changed files with 5 additions and 5 deletions

1
NEWS
View File

@ -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)
-------------------

View File

@ -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];

View File

@ -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];
}