[Python-checkins] r56964 - tracker/roundup-src/roundup/cgi/templating.py
erik.forsberg
python-checkins at python.org
Sun Aug 12 21:01:47 CEST 2007
Author: erik.forsberg
Date: Sun Aug 12 21:01:45 2007
New Revision: 56964
Modified:
tracker/roundup-src/roundup/cgi/templating.py
Log:
Modify URL regexp to demand URLs to end with letter, digit, underscore
or slash. Fixes http://psf.upfronthosting.co.za/roundup/meta/issue127.
Modified: tracker/roundup-src/roundup/cgi/templating.py
==============================================================================
--- tracker/roundup-src/roundup/cgi/templating.py (original)
+++ tracker/roundup-src/roundup/cgi/templating.py Sun Aug 12 21:01:45 2007
@@ -1231,7 +1231,7 @@
return self.is_edit_ok()
class StringHTMLProperty(HTMLProperty):
- hyper_re = re.compile(r'((?P<url>\w{3,6}://\S+)|'
+ hyper_re = re.compile(r'((?P<url>\w{3,6}://\S+[\w/])|'
r'(?P<email>[-+=%/\w\.]+@[\w\.\-]+)|'
r'(?P<item>(?P<class>[A-Za-z_]+)(\s*)(?P<id>\d+)))')
def _hyper_repl(self, match):
More information about the Python-checkins
mailing list