Re: Re: svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/filter/logical_filters.c branches/PHP_5_3/NEWS
branches/PHP_5_3/ext/filter/logical_filters.c trunk/ext/filter/logical_filters.c
| From: | Wietse Venema | Date: | Sat, 03 Apr 2010 00:51:19 +0000 |
| Subject: | Re: Re: svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/filter/logical_filters.c branches/PHP_5_3/NEWS branches/PHP_5_3/ext/filter/logical_filters.c trunk/ext/filter/logical_filters.c |
||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-47759@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf:
> The ABNF for an HTML5 valid email field is:
>
> 1*( atext / "." ) "@" ldh-str 1*( "." ldh-str )
>
> which means there must be a . in the domain part, so HTML5 doesn't think
> a@b is valid either. The left-hand side looks wrong though. It seems
> to me it should be:
>
> 1*atext *("." 1*atext)
>
> You can't have a trailing . there. rasmus.@php.net is not valid and if
> I am reading that HTML5 ABNF correctly it would seem to allow that.
The Internet mail RFCs don't allow a leading or trailing "dot" in
the local-part (they do allow it when the local-part is quoted).
This is a fragment from RFC5321 (SMTP):
Mailbox = Local-part "@" ( Domain / address-literal )
Local-part = Dot-string / Quoted-string
; MAY be case-sensitive
Dot-string = Atom *("." Atom)
Atom = 1*atext
The corresponding part of RFC5322 (Internet Message Format) says:
addr-spec = local-part "@" domain
local-part = dot-atom / quoted-string / obs-local-part
atom = [CFWS] 1*atext [CFWS]
dot-atom-text = 1*atext *("." 1*atext)
dot-atom = [CFWS] dot-atom-text [CFWS]
I.e. both agree in their own way.
Wietse