Fix for bug 146584. We need to convert plain text data to HTML before inserting it into a HTML compose window. R=varada, SR=mscott
git-svn-id: svn://10.0.0.236/trunk@123516 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1465,6 +1465,15 @@ mime_parse_stream_complete (nsMIMESession *stream)
|
||||
{
|
||||
if (body && composeFormat == nsIMsgCompFormat::PlainText)
|
||||
{
|
||||
//We need to convert the plain/text to HTML in order to escape any HTML markup
|
||||
char *escapedBody = nsEscapeHTML(body);
|
||||
if (escapedBody)
|
||||
{
|
||||
PR_Free(body);
|
||||
body = escapedBody;
|
||||
bodyLen = strlen(body);
|
||||
}
|
||||
|
||||
char* newbody = (char *)PR_MALLOC (bodyLen + 12); //+11 chars for <pre> & </pre> tags
|
||||
if (newbody)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user