Bug 225245 image shown as attachment instead of inline if the cid uses single quotes

R=ducarroz sr=bienvenu
This commit is contained in:
timeless%mozdev.org 2004-05-18 08:18:55 +00:00
Родитель 297ab54142
Коммит 45ef4611cb
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -817,13 +817,13 @@ flush_tag(MimeMultipartRelated* relobj)
char* part_url;
char* ptr = buf;
char *ptr2;
PRBool isquote = PR_FALSE;
char quoteDelimiter = '\0';
while (*ptr && *ptr != '=') ptr++;
if (*ptr == '=') {
ptr++;
if (*ptr == '"') {
isquote = PR_TRUE;
/* Take up the double quote and leading space here as well. */
if (*ptr == '"' || *ptr == '\'') {
quoteDelimiter = *ptr;
/* Take up the quote and leading space here as well. */
/* Safe because there's a '>' at the end */
do {ptr++;} while (nsCRT::IsAsciiSpace(*ptr));
}
@ -832,9 +832,9 @@ flush_tag(MimeMultipartRelated* relobj)
if (status < 0) return status;
buf = ptr;
if (!*buf) break;
if (isquote)
if (quoteDelimiter)
{
ptr = PL_strnchr(buf, '"', length - (buf - relobj->curtag));
ptr = PL_strnchr(buf, quoteDelimiter, length - (buf - relobj->curtag));
} else {
for (ptr = buf; *ptr ; ptr++) {
if (*ptr == '>' || nsCRT::IsAsciiSpace(*ptr)) break;