A change for phone/fax field. Write out attribute and value separatly since value needs charset conversion but not for attribute, bug 38901, r=rhp.

This commit is contained in:
nhotta%netscape.com 2000-08-02 22:00:04 +00:00
Родитель 8025735b84
Коммит 6dd422fb71
1 изменённых файлов: 8 добавлений и 2 удалений

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

@ -1450,8 +1450,6 @@ static int WriteOutEachVCardPhoneProperty (MimeObject *obj, VObject* o)
value = fakeCString (vObjectUStringZValue(o));
if (value)
{
attribName = vCard_SACat (&attribName, value);
PR_FREEIF (value);
if (attribName)
{
status = OutputFont(obj, PR_FALSE, "-1", NULL);
@ -1459,11 +1457,18 @@ static int WriteOutEachVCardPhoneProperty (MimeObject *obj, VObject* o)
PR_FREEIF (attribName);
return status;
}
// write a label without charset conversion
status = WriteLineToStream (obj, attribName, PR_FALSE);
if (status < 0) {
PR_FREEIF (attribName);
return status;
}
// write value with charset conversion
status = WriteLineToStream (obj, value, PR_TRUE);
if (status < 0) {
PR_FREEIF (value);
return status;
}
status = OutputFont(obj, PR_TRUE, NULL, NULL);
if (status < 0) {
PR_FREEIF (attribName);
@ -1472,6 +1477,7 @@ static int WriteOutEachVCardPhoneProperty (MimeObject *obj, VObject* o)
}
PR_FREEIF (attribName);
}
PR_FREEIF (value);
}
}
}