Changeset de62b8


Ignore:
Timestamp:
Nov 6, 2007, 2:44:04 PM (12 years ago)
Author:
rene <rene@…>
Branches:
master
Children:
8a0f50
Parents:
a9edcd
Message:

bugfix, problems if no email in From:-field, uses values of last RegexpMatches? from anyvere else

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chrome/content/v_identity/v_identity.js

    ra9edcd rde62b8  
    6666       
    6767        parseAddress : function(address) {
     68            //~ vI_notificationBar.dump("## v_identity: getAddress: parsing '" + address + "'\n")
     69            var name = ""; email = "";
    6870            // prefer an email address separated with < >, only if not found use any other
    69             if (!address.match(/<\s*[^>\s]*@[^>\s]*\s*>/)) address.match(/<?\s*[^>\s]*@[^>\s]*\s*>?/)
    70             var name = RegExp.leftContext + RegExp.rightContext
    71             var email = RegExp.lastMatch
    72             email = email.replace(/\s+|<|>/g,"")
    73             name = name.replace(/^\s+|\s+$/g,"")
     71            if (address.match(/<\s*[^>\s]*@[^>\s]*\s*>/) || address.match(/<?\s*[^>\s]*@[^>\s]*\s*>?/)) {
     72                name = RegExp.leftContext + RegExp.rightContext
     73                email = RegExp.lastMatch
     74                email = email.replace(/\s+|<|>/g,"")
     75                name = name.replace(/^\s+|\s+$/g,"")
     76            }
    7477            vI_notificationBar.dump("## v_identity: getAddress: name '" +
    7578                name + "' email '" + email + "'\n");
Note: See TracChangeset for help on using the changeset viewer.