fix context menu and saving of inline attachments r=ducarroz, sr=sspitzer a=scc 129852

This commit is contained in:
bienvenu%netscape.com 2002-03-22 03:57:07 +00:00
parent 48e1bd36b3
commit 4d465d4679

View File

@ -486,9 +486,18 @@ MimeMultipartRelated_output_child_p(MimeObject *obj, MimeObject* child)
part = mime_set_url_part(obj->options->url, partnum.get(),
PR_FALSE);
if (part) {
char *name = MimeHeaders_get_name(child->headers, child->options);
// let's stick the filename in the part so save as will work.
if (name)
{
char *savePart = part;
part = PR_smprintf("%s&filename=%s", savePart, name);
PR_Free(savePart);
PR_Free(name);
}
char *temp = part;
/* If there's a space in the url, escape the url.
(This happens primarily on Windows and Unix.) */
char *temp = part;
if (PL_strchr(part, ' ') || PL_strchr(part, '>') || PL_strchr(part, '%'))
temp = escape_for_mrel_subst(part);
PL_HashTableAdd(relobj->hash, absolute, temp);