Author: jab
Date: 2008-10-18 18:40:31 -0600 (Sat, 18 Oct 2008)
New Revision: 3629

Modified:
   FormEncode/trunk/formencode/validators.py
Log:
allow % in urls


Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py   2008-10-17 22:22:44 UTC (rev 
3628)
+++ FormEncode/trunk/formencode/validators.py   2008-10-19 00:40:31 UTC (rev 
3629)
@@ -1384,6 +1384,10 @@
         'http://hahaha.ha/bar.html'
         >>> u.to_python('http://xn--m7r7ml7t24h.com')
         'http://xn--m7r7ml7t24h.com'
+        >>> u.to_python('http://foo.com/test?bar=baz&fleem=morx')
+        'http://foo.com/test?bar=baz&fleem=morx'
+        >>> 
u.to_python('http://foo.com/login?came_from=http%3A%2F%2Ffoo.com%2Ftest')
+        'http://foo.com/login?came_from=http%3A%2F%2Ffoo.com%2Ftest'
         >>> u.to_python('http://foo.com:8000/test.html')
         'http://foo.com:8000/test.html'
         >>> u.to_python('http://foo.com/something\\nelse')
@@ -1432,10 +1436,10 @@
         (?:[%:\w]*@)?                           # authenticator
         (?P<domain>[a-z0-9][a-z0-9\-]{1,62}\.)* # (sub)domain - alpha followed 
by 62max chars (63 total)
         (?P<tld>[a-z]{2,})                      # TLD
-        (?::[0-9]+)?                             # port
+        (?::[0-9]+)?                            # port
 
         # files/delims/etc
-        (?P<path>/[a-z0-9\-\._~:/[EMAIL PROTECTED]&\'\(\)\*\+,;=]*)?
+        (?P<path>/[a-z0-9\-\._~:/[EMAIL PROTECTED]&\'\(\)\*\+,;=]*)?
         $
     ''', re.I | re.VERBOSE)
 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs

Reply via email to