rem: var newName = prompt( bundle.GetStringFromName("renameprofilepromptA") + oldName + bundle.GetStringFromName("renameprofilepromptB"), "" ); 
add: var newName = prompt( bundle.GetStringFromName("renameprofilepromptA") + oldName + bundle.GetStringFromName("renameprofilepromptB"), oldName ); 
context: function RenameProfile(){  renameButton = document.getElementById("renbutton");  if( renameButton.getAttribute("disabled") == "true" )    return;  var profileTree = document.getElementById( "profiles" );  if( !profileTree.selectedItems.length ) {    alert( bundle.GetStringFromName("noneselectedrename") );    return;  }  else if( profileTree.selectedItems.length != 1 ) {    alert( bundle.GetStringFromName("wrongnumberselectedrename") );    return;  }  else {    var selected = profileTree.selectedItems[0];    if( selected.getAttribute("rowMigrate") == "no" ) {      // migrate if the user wants to      var lString = bundle.GetStringFromName("migratebeforerename");      lString = lString.replace(/\s*<html:br\/>/g,"\n");      if( confirm( lString ) )         profile.migrateProfile( profilename, true );      else        return false;    }    else {      var oldName = selected.getAttribute("rowName");      var newName = prompt( bundle.GetStringFromName("renameprofilepromptA") + oldName + bundle.GetStringFromName("renameprofilepromptB"), "" );      dump("*** newName = |" + newName + "|\n");      if( newName == "" || !newName )        return false;      var invalidChars = ["/", "\\", "*", ":"];      for( var i = 0; i < invalidChars.length; i++ )      {        if( newName.indexOf( invalidChars[i] ) != -1 ) {          var aString = bundle.GetStringFromName("invalidCharA");          var bString = bundle.GetStringFromName("invalidCharB");          bString = bString.replace(/\s*<html:br\/>/g,"\n");          var lString = aString + invalidChars[i] + bString;          alert( lString );          return false;        }      }              var migrate = selected.getAttribute("rowMigrate");      dump("*** oldName = "+ oldName+ ", newName = "+ newName+ ", migrate = "+ migrate+ "\n");      try {        profile.renameProfile(oldName, newName);        selected.firstChild.firstChild.setAttribute( "value", newName );        selected.setAttribute( "rowName", newName );        selected.setAttribute( "profile_name", newName );      }      catch(e) {        var lString = bundle.GetStringFromName("profileExists");        alert( lString );      }    }  }  // set the button state  DoEnabling();  }
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/72d67fd1735524a11b03e69c7e6e155d6f47fbdd/profileManager.js/buggy/profile/resources/content/profileManager.js