From 61484f1c496920c72657e6557e05318fecc96343 Mon Sep 17 00:00:00 2001 From: "mnyromyr%tprac.de" Date: Tue, 28 Jun 2005 21:44:09 +0000 Subject: [PATCH] Bug 256314: Wrong identity chosen when address contains +; r=Stefan.Borggraefe, sr=bienvenu, a=bsmedberg --- mail/base/content/mailCommands.js | 2 +- mailnews/base/resources/content/mailCommands.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mail/base/content/mailCommands.js b/mail/base/content/mailCommands.js index 296fd66fac31..e9b3540a5925 100644 --- a/mail/base/content/mailCommands.js +++ b/mail/base/content/mailCommands.js @@ -103,7 +103,7 @@ function getBestIdentity(identities, optionalHint) var tempID; for (id = 0; id < identities.Count(); id++) { tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity); - if (optionalHint.search(tempID.email.toLowerCase()) >= 0) { + if (optionalHint.indexOf(tempID.email.toLowerCase()) >= 0) { identity = tempID; break; } diff --git a/mailnews/base/resources/content/mailCommands.js b/mailnews/base/resources/content/mailCommands.js index 6d482db47e53..687006b944dc 100644 --- a/mailnews/base/resources/content/mailCommands.js +++ b/mailnews/base/resources/content/mailCommands.js @@ -105,7 +105,7 @@ function getBestIdentity(identities, optionalHint) var tempID; for (id = 0; id < identities.Count(); id++) { tempID = identities.GetElementAt(id).QueryInterface(Components.interfaces.nsIMsgIdentity); - if (optionalHint.search(tempID.email.toLowerCase()) >= 0) { + if (optionalHint.indexOf(tempID.email.toLowerCase()) >= 0) { identity = tempID; break; }