According to RFC 2822, an email address could be of the form:

name-addr = [display-name] angle-addr
angle-addr = [CFWS] "<" addr-spec ">" [CFWS] / obs-angle-addr
display-name = phrase
addr-spec = local-part "@" domain

However, invite.module rejects those addresses as invalid.

This might not be a problem if users are entering addresses by hand, but if using an automated approach (like the plaxo widget, such addresses may be listed.

The attached patch is a simple fix for this problem. It might not be perfect in terms of regex, but it is good enough for me at the moment.

CommentFileSizeAuthor
invite-angled.patch665 bytesyhager

Comments

smk-ka’s picture

Status: Needs review » Postponed (maintainer needs more info)

HEAD is only sporadically synced, so if you're using it you probably don't have all the latest features.

This issue has been targeted by #183018: Parsing Email adresses, see http://drupal.org/cvs?commit=88299. At least it should. If it still doesn't work for you, could you send me an example email where it breaks?

yhager’s picture

Version: master » 5.x-1.12
Status: Postponed (maintainer needs more info) » Fixed

My mistake, I was using ver 5.x-1.12. Looking at the commit and release log, it seems that this commit would fix this issue, and that it is present on 5.x-1.13. I can't test it at the moment, but from looking at the code, it looks like it's fixed.
Thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

sethcohn’s picture

Version: 5.x-1.12 » 5.x-1.13
Priority: Minor » Normal
Status: Closed (fixed) » Needs review

Reopening...

Using 1.13, and the plaxo widget mentioned above, some addresses are dropped in the textfield in the form:

 "user@domain.com" <user@domain.com>

This is a perfectly valid email, but fails with the current validator. The patch above _does_ fix this problem.

sethcohn’s picture

Status: Needs review » Needs work

Patch is still needed, though the location of the patch is different.

paganwinter’s picture

Subscribing...

sethcohn’s picture

Version: 5.x-1.13 » 5.x-2.x-dev
Status: Needs work » Reviewed & tested by the community

bump. I'm using this patch with success, and would love to it made a part of the official code.

smk-ka’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting back, patch has been committed to all 2.x branches.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.