Skip to content

Commit 17d98d2

Browse files
author
Richard Jones
committed
issue2550549: Some bugs issue classifiers were causing database lookup errors
1 parent e863810 commit 17d98d2

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Fixes:
1515
the tracker->web variable. Closes issue2537286, thanks to "stuidge"
1616
for reporting.
1717
- Fix some format errors in italian translation file
18+
- Some bugs issue classifiers were causing database lookup errors
19+
1820

1921
2009-10-09 1.4.10 (r4374)
2022

roundup/cgi/templating.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1358,9 +1358,12 @@ def _hyper_repl(self, match):
13581358
elif match.group('email'):
13591359
s = match.group('email')
13601360
return '<a href="mailto:%s">%s</a>'%(s, s)
1361-
else:
1361+
elif len(match.group('id')) < 10:
13621362
return self._hyper_repl_item(match,
13631363
'<a href="%(cls)s%(id)s">%(item)s</a>')
1364+
else:
1365+
# just return the matched text
1366+
return match.group(0)
13641367

13651368
def _hyper_repl_rst(self, match):
13661369
if match.group('url'):
@@ -1369,8 +1372,11 @@ def _hyper_repl_rst(self, match):
13691372
elif match.group('email'):
13701373
s = match.group('email')
13711374
return '`%s <mailto:%s>`_'%(s, s)
1372-
else:
1375+
elif len(match.group('id')) < 10:
13731376
return self._hyper_repl_item(match,'`%(item)s <%(cls)s%(id)s>`_')
1377+
else:
1378+
# just return the matched text
1379+
return match.group(0)
13741380

13751381
def hyperlinked(self):
13761382
""" Render a "hyperlinked" version of the text """

test/test_templating.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ def t(s): return p.hyper_re.sub(p._hyper_repl, s)
150150
ae(t('http://roundup.net/'), '<a href="http://roundup.net/">http://roundup.net/</a>')
151151
ae(t('&lt;HTTP://roundup.net/&gt;'), '&lt;<a href="HTTP://roundup.net/">HTTP://roundup.net/</a>&gt;')
152152
ae(t('&lt;www.roundup.net&gt;'), '&lt;<a href="http://www.roundup.net">www.roundup.net</a>&gt;')
153+
ae(t('item123123123123'), 'item123123123123')
153154

154155
'''
155156
class HTMLPermissions:

0 commit comments

Comments
 (0)