summaryrefslogtreecommitdiff
path: root/mailnews/compose
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-11-11 00:54:45 -0500
committerMatt A. Tobin <email@mattatobin.com>2019-11-11 00:54:45 -0500
commit0903ef35611c8d2a966f057d2e74437a73de71df (patch)
tree86887ecd9e09a790dc74188f98a24b7d36863246 /mailnews/compose
parentbca2de131b9a931f612435d8e50864ebcb7519f8 (diff)
downloaduxp-0903ef35611c8d2a966f057d2e74437a73de71df.tar.gz
Bug 1167982 - Do charset detection for all text/* attachments in composition, not just text/plain.
Tag #1273
Diffstat (limited to 'mailnews/compose')
-rw-r--r--mailnews/compose/src/nsMsgAttachmentHandler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mailnews/compose/src/nsMsgAttachmentHandler.cpp b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
index 0ae253ed6e..9555de37fc 100644
--- a/mailnews/compose/src/nsMsgAttachmentHandler.cpp
+++ b/mailnews/compose/src/nsMsgAttachmentHandler.cpp
@@ -522,7 +522,9 @@ DONE:
nsresult
nsMsgAttachmentHandler::PickCharset()
{
- if (!m_charset.IsEmpty() || !m_type.LowerCaseEqualsLiteral(TEXT_PLAIN))
+ if (!m_charset.IsEmpty() ||
+ !StringBeginsWith(m_type, NS_LITERAL_CSTRING("text/"),
+ nsCaseInsensitiveCStringComparator()))
return NS_OK;
nsCOMPtr<nsIFile> tmpFile =