Bug 290565 - Follow-up: Don't lose NBSP if composition started as plain text. r=me DONTBUILD
authorJorg K <jorgk@jorgk.com>
Sun, 09 Jul 2017 20:53:00 +0200
changeset 52556 18217986ac6a0d930b6dc7d693045c2eb7045b50
parent 52555 09ea358d02ae7a2120531d81038cee038eca32d6
child 52557 7e89569fe183633ed9519198d15833e5b1bb07ae
push id4664
push usermozilla@hocat.ca
push dateMon, 10 Jul 2017 22:23:39 +0000
treeherdertry-comm-central@033ee3039f52 [default view] [failures only]
reviewersme
bugs290565
Bug 290565 - Follow-up: Don't lose NBSP if composition started as plain text. r=me DONTBUILD
mailnews/compose/src/nsMsgCompose.cpp
--- a/mailnews/compose/src/nsMsgCompose.cpp
+++ b/mailnews/compose/src/nsMsgCompose.cpp
@@ -1323,16 +1323,18 @@ NS_IMETHODIMP nsMsgCompose::SendMsg(MSG_
       if (flowed)
         flags |= nsIDocumentEncoder::OutputFormatFlowed;
       if (delsp)
         flags |= nsIDocumentEncoder::OutputFormatDelSp;
       if (formatted)
         flags |= nsIDocumentEncoder::OutputFormatted;
       if (disallowBreaks)
         flags |= nsIDocumentEncoder::OutputDisallowLineBreaking;
+      // Don't lose NBSP in the plain text encoder.
+      flags |= nsIDocumentEncoder::OutputPersistNBSP;
     }
     rv = m_editor->OutputToString(contentType, flags, msgBody);
     NS_ENSURE_SUCCESS(rv, rv);
   }
   else
   {
     m_compFields->GetBody(msgBody);
   }