diff roundup/cgi/templating.py @ 4288:ce684080e968

issue2550549: Some bugs issue classifiers were causing database lookup errors
author Richard Jones <richard@users.sourceforge.net>
date Sat, 28 Nov 2009 22:44:02 +0000
parents f364978e6e3f
children 966592263fb8
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Tue Nov 24 20:43:33 2009 +0000
+++ b/roundup/cgi/templating.py	Sat Nov 28 22:44:02 2009 +0000
@@ -1358,9 +1358,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'):
@@ -1369,8 +1372,11 @@
         elif match.group('email'):
             s = match.group('email')
             return '`%s <mailto:%s>`_'%(s, s)
+        elif len(match.group('id')) < 10:
+            return self._hyper_repl_item(match,'`%(item)s <%(cls)s%(id)s>`_')
         else:
-            return self._hyper_repl_item(match,'`%(item)s <%(cls)s%(id)s>`_')
+            # just return the matched text
+            return match.group(0)
 
     def hyperlinked(self):
         """ Render a "hyperlinked" version of the text """

Roundup Issue Tracker: http://roundup-tracker.org/