rem: docURI = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI); docURI.spec = aDocumentURLString; var docURL = docURI.QueryInterface(Components.interfaces.nsIURL); 
add:  var ioService = GetIOService(); docURI = ioService.newURI(aDocumentURLString, window.editorShell.GetDocumentCharacterSet(), null); docURI = docURI.QueryInterface(Components.interfaces.nsIURL); 
context: function GetSuggestedFileName(aDocumentURLString, aMIMEType, aHTMLDoc){  var extension = GetExtensionBasedOnMimeType(aMIMEType);  if (extension)    extension = "." + extension;  // check for existing file name we can use  if (aDocumentURLString.length >= 0 && !IsUrlAboutBlank(aDocumentURLString))  {    var docURI = null;    try {      docURI = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI);      docURI.spec = aDocumentURLString;      var docURL = docURI.QueryInterface(Components.interfaces.nsIURL);      // grab the file name      var url = docURL.fileBaseName;      if (url)        return url+extension;    } catch(e) {}  }   // check if there is a title we can use  var title = aHTMLDoc.title;  if (title.length > 0) // we have a title; let's see if it's usable  {    // clean up the title to make it a usable filename    title = title.replace(/\"/g, "");  // Strip out quote character: "    title = TrimString(title); // trim whitespace from beginning and end    title = title.replace(/[ \.\\@\/:]/g, "_");  //Replace "bad" filename characters with "_"    if (title.length > 0)      return title + extension;  }  // if we still don't have a file name, let's just go with "untitled"  // shouldn't this come out of a string bundle? I'm shocked localizers haven't complained!  return "untitled" + extension;}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/d91b053f419d4d0175bdb25deed21f7800ac5c27/ComposerCommands.js/buggy/editor/ui/composer/content/ComposerCommands.js