Bug 734027 - Decode percent encoding on non-ASCII filename when saving a video snapshot. r=jaws

This commit is contained in:
Ekanan Ketunuti 2012-03-08 18:18:35 +07:00
parent a6c7300ff7
commit 86ced87fec

View File

@ -850,7 +850,7 @@ nsContextMenu.prototype = {
let uri = makeURI(this.mediaURL);
let url = uri.QueryInterface(Ci.nsIURL);
if (url.fileBaseName)
name = url.fileBaseName + ".jpg";
name = decodeURI(url.fileBaseName) + ".jpg";
} catch (e) { }
if (!name)
name = "snapshot.jpg";