зеркало из https://github.com/mozilla/pjs.git
Bug #46881 --> set the charset correctly for mutlipart/alternative
r=rhp
This commit is contained in:
Родитель
1b7064e389
Коммит
63867f7340
|
@ -206,15 +206,9 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
|
||||||
// we need to tell the emitter that this is the case for use in in any
|
// we need to tell the emitter that this is the case for use in in any
|
||||||
// possible reply or forward operation.
|
// possible reply or forward operation.
|
||||||
//
|
//
|
||||||
PRBool isAlternativeOrRelated;
|
PRBool isAlternativeOrRelated = PR_FALSE;
|
||||||
PRBool isBody = MimeObjectChildIsMessageBody(obj, &isAlternativeOrRelated);
|
PRBool isBody = MimeObjectChildIsMessageBody(obj, &isAlternativeOrRelated);
|
||||||
if (isBody)
|
if ( (isAlternativeOrRelated || isBody) && obj->options)
|
||||||
{
|
|
||||||
MimeContainer *container = (MimeContainer*) obj;
|
|
||||||
// If we have only one child and this is the message body object,
|
|
||||||
// this we should check for a special charset and notify the emitter
|
|
||||||
// if one exists!
|
|
||||||
if ( (container->children) && (container->nchildren == 1) && (obj->options) )
|
|
||||||
{
|
{
|
||||||
char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
|
char *ct = MimeHeaders_get(mult->hdrs, HEADER_CONTENT_TYPE, PR_FALSE, PR_FALSE);
|
||||||
if (ct)
|
if (ct)
|
||||||
|
@ -223,7 +217,6 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
|
||||||
if (cset)
|
if (cset)
|
||||||
{
|
{
|
||||||
mimeEmitterUpdateCharacterSet(obj->options, cset);
|
mimeEmitterUpdateCharacterSet(obj->options, cset);
|
||||||
|
|
||||||
if (!(obj->options->override_charset))
|
if (!(obj->options->override_charset))
|
||||||
{
|
{
|
||||||
// Also set this charset to msgWindow
|
// Also set this charset to msgWindow
|
||||||
|
@ -239,7 +232,6 @@ MimeMultipart_parse_line (char *line, PRInt32 length, MimeObject *obj)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче