rem: var defaultFileName = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri); fp.defaultString = getNormalizedLeafName(defaultFileName, contentType); 
add: fp.defaultString = getDefaultFileName(aData.fileName, aSniffer.suggestedFileName, aSniffer.uri, aData.document); 
context: function foundHeaderInfo(aSniffer, aData){  var contentType = aSniffer.contentType;  var fp = makeFilePicker();  var titleKey = aData.filePickerTitle || "SaveLinkTitle";  var bundle = getStringBundle();  fp.init(window, bundle.GetStringFromName(titleKey),           Components.interfaces.nsIFilePicker.modeSave);  var modeComplete = aData.document != null &&                      (contentType == "text/html" || contentType == "text/xml");  appendFiltersForContentType(fp, aSniffer.contentType,                              modeComplete ? MODE_COMPLETE : MODE_FILEONLY);    // Determine what the 'default' string to display in the File Picker dialog   // should be.   var defaultFileName = getDefaultFileName(aData.fileName,                                            aSniffer.suggestedFileName,                                            aSniffer.uri);  fp.defaultString = getNormalizedLeafName(defaultFileName, contentType);    if (fp.show() == Components.interfaces.nsIFilePicker.returnCancel || !fp.file)    return;      fp.file.leafName = validateFileName(fp.file.leafName);  fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType);  // XXX turn this on when Adam lands the ability to save as a specific content//     type//var contentType = fp.filterIndex == 2 ? "text/unicode" : "text/html";  var source = (aData.document && contentType == "text/html" &&                fp.filterIndex == 0) ? aData.document : aSniffer.uri;    var persistArgs = {    source    : source,//  XXX turn this on when Adam lands the ability to save as a specific content//      type//  contentType : fp.filterIndex == 2 ? "text/unicode" : "text/html";    target    : fp.file,    postData  : getPostData()  };    openDialog("chrome://global/content/nsProgressDlg.xul", "",               "chrome,titlebar,minizable,dialog=yes",               makeWebBrowserPersist(), persistArgs);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/eb4723e78974099d3b82efcfb33a15f7719781dd/contentAreaUtils.js/buggy/xpfe/communicator/resources/content/contentAreaUtils.js