[Python-checkins] r76582 - tracker/roundup-src/roundup/cgi/templating.py
martin.v.loewis
python-checkins at python.org
Sun Nov 29 09:50:40 CET 2009
Author: martin.v.loewis
Date: Sun Nov 29 09:50:40 2009
New Revision: 76582
Log:
Patch from Richard Jones for issue 2550549.
Modified:
tracker/roundup-src/roundup/cgi/templating.py
Modified: tracker/roundup-src/roundup/cgi/templating.py
==============================================================================
--- tracker/roundup-src/roundup/cgi/templating.py (original)
+++ tracker/roundup-src/roundup/cgi/templating.py Sun Nov 29 09:50:40 2009
@@ -1353,9 +1353,12 @@
elif match.group('email'):
s = match.group('email')
return '<a href="mailto:%s">%s</a>'%(s, s)
- else:
+ elif len(match.group('id')) < 10:
return self._hyper_repl_item(match,
'<a href="%(cls)s%(id)s">%(item)s</a>')
+ else:
+ # just return the matched text
+ return match.group(0)
def _hyper_repl_rst(self, match):
if match.group('url'):
@@ -1364,8 +1367,11 @@
elif match.group('email'):
s = match.group('email')
return '`%s <mailto:%s>`_'%(s, s)
- else:
+ elif len(match.group('id')) < 10:
return self._hyper_repl_item(match,'`%(item)s <%(cls)s%(id)s>`_')
+ else:
+ # just return the matched text
+ return match.group(0)
def hyperlinked(self):
""" Render a "hyperlinked" version of the text """
More information about the Python-checkins
mailing list