rem: fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType); 
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 isDocument = aData.document != null && isDocumentType(contentType);  appendFiltersForContentType(fp, aSniffer.contentType,                              isDocument ? MODE_COMPLETE : MODE_FILEONLY);    const prefSvcContractID = "@mozilla.org/preferences-service;1";  const prefSvcIID = Components.interfaces.nsIPrefService;                                var prefs = Components.classes[prefSvcContractID].getService(prefSvcIID).getBranch("browser.download.");    const nsILocalFile = Components.interfaces.nsILocalFile;  try {    fp.displayDirectory = prefs.getComplexValue("dir", nsILocalFile);  }  catch (e) {  }  if (isDocument) {    try {      fp.filterIndex = prefs.getIntPref("save_converter_index");    }    catch (e) {    }  }    // 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;      if (isDocument)     prefs.setIntPref("save_converter_index", fp.filterIndex);  var directory = fp.file.parent.QueryInterface(nsILocalFile);  prefs.setComplexValue("dir", nsILocalFile, directory);      fp.file.leafName = validateFileName(fp.file.leafName);  fp.file.leafName = getNormalizedLeafName(fp.file.leafName, contentType);    // If we're saving a document, and are saving either in complete mode or   // as converted text, pass the document to the web browser persist component.  // If we're just saving the HTML (second option in the list), send only the URI.  var source = (isDocument && fp.filterIndex != 1) ? aData.document : aSniffer.uri;    var persistArgs = {    source      : source,    contentType : (isDocument && fp.filterIndex == 2) ? "text/plain" : contentType,    target      : fp.file,    postData    : isDocument ? getPostData() : null,    bypassCache : aData.bypassCache  };    openDialog("chrome://global/content/nsProgressDlg.xul", "",               "chrome,titlebar,minimizable,dialog=yes",               makeWebBrowserPersist(), persistArgs);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/8fd2822bf191101780ae2aae0343fd7575032d1b/contentAreaUtils.js/buggy/xpfe/communicator/resources/content/contentAreaUtils.js