Fix for interpreting plain text sig's when doing HTML compose - Bug #: 33423 - r: bienvenu

This commit is contained in:
rhp%netscape.com 2000-03-29 01:57:14 +00:00
Родитель 2f6c92b4e8
Коммит 5c06c15d42
1 изменённых файлов: 24 добавлений и 1 удалений

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

@ -1808,7 +1808,30 @@ nsMsgCompose::ConvertTextToHTML(nsFileSpec& aSigFile, nsString &aSigData)
if (NS_FAILED(rv))
return rv;
aSigData.Append(origBuf);
// Ok, once we are here, we need to escape the data to make sure that
// we don't do HTML stuff with plain text sigs.
//
char *tString = origBuf.ToNewCString();
if (tString)
{
char *escaped = nsEscapeHTML(tString);
if (escaped)
{
aSigData.Append(escaped);
nsCRT::free(escaped);
}
else
{
aSigData.Append(origBuf);
}
nsCRT::free(tString);
}
else
{
aSigData.Append(origBuf);
}
return NS_OK;
}