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:
jshin%mailaps.org 2006-07-29 05:42:29 +00:00
Родитель 1ad7a300e9
Коммит 2b4d70c407
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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.