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

R=ducarroz sr=bienvenu


git-svn-id: svn://10.0.0.236/trunk@156518 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
timeless%mozdev.org
2004-05-18 08:18:55 +00:00
parent 8232b26811
commit 4a1e0fd20c

View File

@@ -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;