rem: var extensionString = gExtensionField.value.replace(/[*.;]/g, ""); 
add: var extensionString = gExtensionField.value.replace(/[*.;]/g, "").toLowerCase(); 
context: function onOK(){  // Make sure all fields are filled in OK.  if ( !checkInput() ) {    return false;  }  const mimeTypes = "UMimTyp";  var fileLocator = Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties);    var file = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);    var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);    gDS = gRDF.GetDataSource(ioService.getURLSpecFromFile(file));  // figure out if this mime type already exists.   var exists = mimeHandlerExists(gMIMEField.value);  if (exists) {    var titleMsg = gPrefApplicationsBundle.getString("handlerExistsTitle");    var dialogMsg = gPrefApplicationsBundle.getString("handlerExists");    dialogMsg = dialogMsg.replace(/%mime%/g, gMIMEField.value);    var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);    var replace = promptService.confirm(window, titleMsg, dialogMsg);    if (!replace)    {      window.close();      return;    }  }      // now save the information  var handlerInfo = new HandlerOverride(MIME_URI(gMIMEField.value));  handlerInfo.mUpdateMode = exists; // XXX Somewhat sleazy, I know...  handlerInfo.mimeType = gMIMEField.value;  handlerInfo.description = gDescriptionField.value;    var extensionString = gExtensionField.value.replace(/[*.;]/g, "");  var extensions = extensionString.split(" ");  for (var i = 0; i < extensions.length; i++) {    var currExtension = extensions[i];    handlerInfo.addExtension(currExtension);  }  handlerInfo.appPath = gAppPath.value;  // other info we need to set (not reflected in UI)  handlerInfo.isEditable = true;  handlerInfo.saveToDisk = false;  handlerInfo.handleInternal = false;  handlerInfo.alwaysAsk = true;  file = Components.classes["@mozilla.org/file/local;1"].createInstance();  if (file)    file = file.QueryInterface(Components.interfaces.nsILocalFile);  if (file) {    try {      file.initWithPath(gAppPath.value);      handlerInfo.appDisplayName = file.unicodeLeafName;    }    catch(e) {      handlerInfo.appDisplayName = gAppPath.value;        }  }  // do the rest of the work (ugly yes, but it works)  handlerInfo.buildLinks();    // flush the ds to disk.     var remoteDS = gDS.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);  if (remoteDS)    remoteDS.Flush();    // If an arg was passed, then it's an nsIHelperAppLauncherDialog  // and we need to update its MIMEInfo.  if ( "arguments" in window && window.arguments[0] ) {      // Get mime info.      var info = window.arguments[0].mLauncher.MIMEInfo;      // Update fields that might have changed.      info.preferredAction = Components.interfaces.nsIMIMEInfo.useHelperApp;      info.Description = gDescriptionField.value;      info.preferredApplicationHandler = file;      info.applicationDescription = handlerInfo.appDisplayName;  }  window.opener.gNewTypeRV = gMIMEField.value;  window.close();  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1c41377183c86f3b4371c76a2d1a7c2529e8e6b8/pref-applications-new.js/clean/xpfe/components/prefwindow/resources/content/pref-applications-new.js