Proposed patch: http://lobitos.net/web2py-patches/gluon/validators.py
I've deviated from the RFCs in a couple of places. I'm not allowing
quoted strings for names (neither did the old regex), partly because
I'm not entirely convinced that they're safe, and partly because the
doctest mechanism is problematical in testing certain escaped patterns
that are legal in quoted strings. A possible compromise would be to
allow quotes and be more restrictive about what's allowed in them, if
anyone feels strongly about it.
Domain checking is similar to what we had before, except that single-
letter domains (b.com) are allowed, and I've relaxed the TLD length
restraint from {2,9} to {2,}. As before, we allow embedded
underscores, which are not formally legal, but have been used by
Windows.
The philosophy is that we can't protect the user against all typos,
and we'd prefer to err on the side of permissiveness where it makes
sense, while adhering to the spirit of the RFCs and taking note of
general practice.
If anyone sees any problems, please submit them in the form of
additional doctests (and an optional patch) and I'll deal with them.
I believe that any address that validated before will continue to
validate now.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---