зеркало из https://github.com/mozilla/pjs.git
bug 213337: validate file name before presenting it as a suggested filename (2nd part) : r=cbiesinger, sr=jag, a1.6=asa
This commit is contained in:
Родитель
1ad7a300e9
Коммит
2b4d70c407
|
@ -775,7 +775,7 @@ function getDefaultFileName(aDefaultFileName, aNameFromHeaders, aDocumentURI, aD
|
|||
var textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
|
||||
.getService(Components.interfaces.nsITextToSubURI);
|
||||
var charset = getCharsetforSave(aDocument);
|
||||
return textToSubURI.unEscapeURIForUI(charset, url.fileName);
|
||||
return validateFileName(textToSubURI.unEscapeURIForUI(charset, url.fileName));
|
||||
} catch (e) {
|
||||
// This is something like a wyciwyg:, data:, and so forth
|
||||
// URI... no usable filename here.
|
||||
|
|
Загрузка…
Ссылка в новой задаче