RE: Trailing dot in email (Was: Re: Possible bug according to Rasmus Leerdorf)

Should email address in HTML also be appropriate for use in
mailto: URIs?

http://tools.ietf.org/html/draft-duerst-mailto-bis-09


is a relatively new (March 30, 2010) internet draft. Although
this has been through IETF Last Call on -08 and the changes
to produce -09 are relatively minor (click on one of the
"Diff" links at the top of the above draft), there may be
another (relatively short) IETF last call.

Larry


-----Original Message-----
From: public-html-request@w3.org [mailto:public-html-request@w3.org] On Behalf Of Lars Gunther
Sent: Monday, April 05, 2010 6:00 AM
To: public-html
Subject: Re: Trailing dot in email (Was: Re: Possible bug according to Rasmus Leerdorf)

2010-04-05 10:57, Thomas Broyer skrev:

> RFC2822 doesn't place any rule on what a local-part can be, it's just
> that it must be quoted if it doesn't match the dot-atom syntax.
> I had an address whose local-part was ".tom." and it worked very well,
> except for those badly-authored web forms that chose to rule it out.
> In mails, it had to be written, according to the RFC,
> ".tom."@blahblahblah but it's just a matter of syntax and escaping.

As indeed FILTER_VALIDATE_EMAIL will allow with Rasmus' fix. It does 
however, according to the rules, differentiate between what is allowed 
between quotes and what is allowed without quotes.

// $r = The new regexp used in PHP internally
php > echo preg_match($r, '".tom."@ff.com');
1
php > echo preg_match($r, '.tom.@ff.com');
0

The fix is here:

http://svn.php.net/viewvc/php/php-src/branches/PHP_5_2/ext/filter/logical_filters.c?r1=297350&r2=297349&pathrev=297350


> I can't see any reason that this would be different for web forms used
> to collect email addresses (I'd just expect them to quote the
> local-part if it doesn't match the 'atom' production)

Indeed, but at the moment such quoting is not needed. The solution I 
proposed was thus a bit hasty to suggest, since it was too restrictive. 
The solution in the spec right now is however too permissive.


-- 
Lars Gunther
http://keryx.se/
http://twitter.com/itpastorn/
http://itpastorn.blogspot.com/

Received on Monday, 5 April 2010 19:40:02 UTC