Author: ianb
Date: 2006-12-27 21:10:56 -0700 (Wed, 27 Dec 2006)
New Revision: 2152
Modified:
FormEncode/trunk/formencode/validators.py
Log:
Updated URL regex; fix SF #1582426
Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py 2006-12-28 04:05:39 UTC (rev
2151)
+++ FormEncode/trunk/formencode/validators.py 2006-12-28 04:10:56 UTC (rev
2152)
@@ -1283,7 +1283,7 @@
add_http = True
url_re = re.compile(r'^(http|https)://'
- r'[a-z0-9][a-z0-9\-\._]*\.[a-z]+'
+ r'(?:[a-z0-9\-]+|[a-z0-9][a-z0-9\-\.\_]*\.[a-z]+)'
r'(?::[0-9]+)?'
r'(?:/.*)?$', re.I)
scheme_re = re.compile(r'^[a-zA-Z]+:')
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs