Do not add "-- \n" to signature if it's already in the sig file. Bug 30208. r=bratell, sr=sspitzer.

This commit is contained in:
gerv%gerv.net 2001-08-14 13:33:59 +00:00
Родитель c880a69b75
Коммит 8ec96133ad
1 изменённых файлов: 13 добавлений и 9 удалений

Просмотреть файл

@ -2525,7 +2525,6 @@ nsMsgCompose::ProcessSignature(nsIMsgIdentity *identity, nsString *aMsgBody)
// are doing plain text compose, we should insert some sort of message // are doing plain text compose, we should insert some sort of message
// saying "Image Signature Omitted" or something. // saying "Image Signature Omitted" or something.
// //
nsAutoString urlStr;
nsXPIDLCString sigNativePath; nsXPIDLCString sigNativePath;
PRBool useSigFile = PR_FALSE; PRBool useSigFile = PR_FALSE;
PRBool htmlSig = PR_FALSE; PRBool htmlSig = PR_FALSE;
@ -2646,16 +2645,21 @@ nsMsgCompose::ProcessSignature(nsIMsgIdentity *identity, nsString *aMsgBody)
else else
sigOutput.AppendWithConversion(CRLF); sigOutput.AppendWithConversion(CRLF);
sigOutput.AppendWithConversion(dashes); nsAString& firstFourChars = Substring(sigData, 0, 4);
if ( (!m_composeHTML) || ((m_composeHTML) && (!htmlSig)) ) if (!(firstFourChars.Equals(NS_LITERAL_STRING("-- \n")) ||
sigOutput.AppendWithConversion(CRLF); firstFourChars.Equals(NS_LITERAL_STRING("-- \r")))
else if (m_composeHTML) {
sigOutput.AppendWithConversion(htmlBreak); sigOutput.AppendWithConversion(dashes);
if (!m_composeHTML || !htmlSig)
sigOutput.AppendWithConversion(CRLF);
else if (m_composeHTML)
sigOutput.AppendWithConversion(htmlBreak);
}
sigOutput.Append(sigData); sigOutput.Append(sigData);
//DELETEME: I18N: Converting down (2byte->1byte) OK?
if (m_composeHTML) if (m_composeHTML)
{ {
if (htmlSig) if (htmlSig)