From 0903ef35611c8d2a966f057d2e74437a73de71df Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Mon, 11 Nov 2019 00:54:45 -0500 Subject: Bug 1167982 - Do charset detection for all text/* attachments in composition, not just text/plain. Tag #1273 --- mailnews/compose/src/nsMsgAttachmentHandler.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mailnews') diff --git a/mailnews/compose/src/nsMsgAttachmentHandler.cpp b/mailnews/compose/src/nsMsgAttachmentHandler.cpp index 0ae253ed6..9555de37f 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 tmpFile = -- cgit v1.2.3