Comment 38 for bug 120281

Revision history for this message
In , Andrit (andrit) wrote :

Sorry, but i don't see that it is fixed there.

I've played a bit with sources and it seems that this patch solves the problem:

Index: mailnews/compose/src/nsMsgCompose.cpp
===================================================================
RCS file: /cvsroot/mozilla/mailnews/compose/src/nsMsgCompose.cpp,v
retrieving revision 1.460.2.28
diff -u -r1.460.2.28 nsMsgCompose.cpp
--- mailnews/compose/src/nsMsgCompose.cpp 8 Feb 2007 22:21:08 -0000 1.460.2.28
+++ mailnews/compose/src/nsMsgCompose.cpp 25 Mar 2007 15:44:41 -0000
@@ -3829,7 +3829,15 @@
   // replace '\n' with <br> so that the line breaks won't be lost by html.
   // if mailtourl, do the same.
   if (m_composeHTML && (mType == nsIMsgCompType::New || mType == nsIMsgCompType::MailToUrl))
- body.ReplaceSubstring(NS_LITERAL_STRING("\n").get(), NS_LITERAL_STRING("<br>").get());
+ body.ReplaceSubstring(NS_LITERAL_STRING(NS_LINEBREAK).get(),
+ NS_LITERAL_STRING("<br>").get());
+
+ if (!m_composeHTML) {
+ body.ReplaceSubstring(NS_LITERAL_STRING(" \n").get(),
+ NS_LITERAL_STRING(" ").get());
+ body.ReplaceSubstring(NS_LITERAL_STRING(" \r\n").get(),
+ NS_LITERAL_STRING(" ").get());
+ }

   nsString empty;
   rv = ConvertAndLoadComposeWindow(empty, body, tSignature,