Permalink
Browse files

[fix] Email: More permissive email address parser.

  • Loading branch information...
1 parent e69e133 commit 41e6e11e3cca8079b3c354e873640887e7690778 @akoprow akoprow committed Feb 15, 2012
Showing with 3 additions and 5 deletions.
  1. +3 −5 stdlib/web/mail/email.opa
@@ -127,13 +127,11 @@ Email = {{
* address, that is:
* - small and capital letters,
* - digits,
- * - characters: underscore (_), hyphen (-)
- * Here we are more restrictive than the RFC specification, but
- * are in accordance with common practice (for instance HotMail's
- * requirements on email addresses).
+ * - characters: !#$%&'*+\-/=?^_`{|}~
+ * See: http://en.wikipedia.org/wiki/Email_address#Local_part
*/
@private
- char = parser [A-Za-z0-9_\-];
+ char = parser [A-Za-z0-9!#$%&'*+\-/=?^_`{|}~];
@private
word = parser w=char+ -> Text.to_string(Text.ltconcat(w))

0 comments on commit 41e6e11

Please sign in to comment.