Skip to content

Commit

Permalink
[fix] Email: More permissive email address parser.
Browse files Browse the repository at this point in the history
  • Loading branch information
akoprow committed Feb 15, 2012
1 parent e69e133 commit 41e6e11
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions stdlib/web/mail/email.opa
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -127,13 +127,11 @@ Email = {{
* address, that is: * address, that is:
* - small and capital letters, * - small and capital letters,
* - digits, * - digits,
* - characters: underscore (_), hyphen (-) * - characters: !#$%&'*+\-/=?^_`{|}~
* Here we are more restrictive than the RFC specification, but * See: http://en.wikipedia.org/wiki/Email_address#Local_part
* are in accordance with common practice (for instance HotMail's
* requirements on email addresses).
*/ */
@private @private
char = parser [A-Za-z0-9_\-]; char = parser [A-Za-z0-9!#$%&'*+\-/=?^_`{|}~];


@private @private
word = parser w=char+ -> Text.to_string(Text.ltconcat(w)) word = parser w=char+ -> Text.to_string(Text.ltconcat(w))
Expand Down

0 comments on commit 41e6e11

Please sign in to comment.