Bug 286760 - email address with leading/trailing whitespace in Address book, Account manager, or Composition [foo@bar.com ] displays wrongly with added quotes when composing ["foo"@bar.com], causing lost mails and malformed "duplicate" AB entry. r=jcranmer, a=mkmelin

This puch lands string changes to CLOSED TREE (seamonkey)
This commit is contained in:
Magnus Melin 2014-12-20 14:31:15 +02:00
Родитель 6f2605fc5c
Коммит e30a4cd4d7
2 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -300,7 +300,7 @@ MimeAddressParser.prototype = {
makeMailboxObject: function (aName, aEmail) {
let object = Object.create(Mailbox);
object.name = aName;
object.email = aEmail;
object.email = aEmail ? aEmail.trim() : aEmail;
return object;
},

Просмотреть файл

@ -20,6 +20,10 @@ function run_test() {
"\"Joe Q. Public\" <john.q.public@example.com>"],
["Giant; \"Big\" Box", "sysservices@example.net",
"\"Giant; \\\"Big\\\" Box\" <sysservices@example.net>"],
["trailing", "t1@example.com ", "trailing <t1@example.com>"],
["leading", " t2@example.com", "leading <t2@example.com>"],
["leading trailing", " t3@example.com ", "leading trailing <t3@example.com>"],
["", " t4@example.com ", "t4@example.com"],
];
// Test - empty strings