MailEditor: fix text conversion with HTML entities

This commit is contained in:
Francis Lachapelle
2014-04-23 10:55:04 -04:00
parent 619cb2c0ec
commit 66bfbeaac1

View File

@@ -417,7 +417,15 @@
{
if (!ignoreContent)
{
[result appendString: [[NSString stringWithCharacters: characters length: length] stringByEscapingHTMLString]];
// Append a text node
if (ignoreContentTags)
// We are converting a HTML message to plain text (htmlToTextContentHandler):
// include the HTML tags in the text
[result appendString: [NSString stringWithCharacters: characters length: length]];
else
// We are sanitizing an HTML message (sanitizerContentHandler):
// escape the HTML entitites so they are visible
[result appendString: [[NSString stringWithCharacters: characters length: length] stringByEscapingHTMLString]];
}
}