Bug #331265 --> tab and line feed issues with the new mail alert notification for Thunderbird. sr=bienvenu

This commit is contained in:
scott%scott-macgregor.org 2006-03-22 01:13:30 +00:00
parent 29d82afeff
commit 82d26ca149
2 changed files with 4 additions and 1 deletions

View File

@ -2075,7 +2075,7 @@
msgPopup.setAttribute('subject', msgHdr.mime2DecodedSubject);
// TO DO: worry about character set conversions
var previewText = msgHdr.getStringProperty('preview'); // replace tabs, line returns, etc. with a space
var previewText = msgHdr.getStringProperty('preview');
if (previewText)
msgPopup.setAttribute('previewText', previewText);

View File

@ -5216,6 +5216,9 @@ nsresult nsMsgDBFolder::GetMsgPreviewTextFromStream(nsIMsgDBHdr *msgHdr, nsIInpu
rv = parser->Parse(msgBodyStr, 0, NS_LITERAL_CSTRING("text/html"), PR_TRUE);
CopyUTF16toUTF8(bodyText, msgBody);
}
// replaces all tabs and line returns with a space, then trims off leading and trailing white space
msgBody.CompressWhitespace(PR_TRUE, PR_TRUE);
msgHdr->SetStringProperty("preview", msgBody.get());
return rv;
}