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 21758 18217986ac6a0d930b6dc7d693045c2eb7045b50
parent 21757 09ea358d02ae7a2120531d81038cee038eca32d6
child 21759 7e89569fe183633ed9519198d15833e5b1bb07ae
push id13274
push usermozilla@jorgk.com
push dateSun, 09 Jul 2017 18:58:32 +0000
treeherdercomm-central@18217986ac6a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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);
   }