зеркало из https://github.com/mozilla/gecko-dev.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:
Родитель
64fee0cebf
Коммит
ea156e67c1
|
@ -744,7 +744,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.
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче