Index: trunk/phase3/includes/User.php |
— | — | @@ -638,9 +638,15 @@ |
639 | 639 | /** |
640 | 640 | * Does a string look like an e-mail address? |
641 | 641 | * |
642 | | - * There used to be a regular expression here, it got removed because it |
643 | | - * rejected valid addresses. Actually just check if there is '@' somewhere |
644 | | - * in the given address. |
| 642 | + * This validate an email address using an HTML5 specification found at: |
| 643 | + * http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address |
| 644 | + * Which as of 2011-01-24 says: |
| 645 | + * A valid e-mail address is a string that matches the ABNF production |
| 646 | + * 1*( atext / "." ) "@" ldh-str *( "." ldh-str ) where atext is defined |
| 647 | + * in RFC 5322 section 3.2.3, and ldh-str is defined in RFC 1034 section |
| 648 | + * 3.5. |
| 649 | + * This function is an implementation of the specification as requested in |
| 650 | + * bug 22449. |
645 | 651 | * |
646 | 652 | * @todo Check for RFC 2822 compilance (bug 959) |
647 | 653 | * |