mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 05:35:31 +00:00
Bug #23894 --> be sure to unescape the attachment's display name before brining up the file picker.
r=sspitzer
This commit is contained in:
parent
72bb036628
commit
687e264d13
@ -360,9 +360,10 @@ nsMessenger::OpenAttachment(const char * url, const char * displayName,
|
|||||||
fileSpec(getter_AddRefs(NS_CreateFileSpecWithUI()));
|
fileSpec(getter_AddRefs(NS_CreateFileSpecWithUI()));
|
||||||
|
|
||||||
if (!fileSpec) goto done;
|
if (!fileSpec) goto done;
|
||||||
|
char * unescapedDisplayName = nsCRT::strdup(displayName);
|
||||||
rv = fileSpec->ChooseOutputFile("Save Attachment", displayName,
|
rv = fileSpec->ChooseOutputFile("Save Attachment", nsUnescape(unescapedDisplayName),
|
||||||
nsIFileSpecWithUI::eAllFiles);
|
nsIFileSpecWithUI::eAllFiles);
|
||||||
|
nsCRT::free(unescapedDisplayName);
|
||||||
if (NS_FAILED(rv)) goto done;
|
if (NS_FAILED(rv)) goto done;
|
||||||
|
|
||||||
aSpec = do_QueryInterface(fileSpec, &rv);
|
aSpec = do_QueryInterface(fileSpec, &rv);
|
||||||
|
Loading…
Reference in New Issue
Block a user