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 2003-12-15 23:03:16 +00:00
Родитель 64fee0cebf
Коммит ea156e67c1
2 изменённых файлов: 2 добавлений и 2 удалений

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

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