Mercurial > p > roundup > code
changeset 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 | 630a20c51345 |
| children | 7275e3dec0e0 |
| files | CHANGES.txt roundup/cgi/templating.py test/test_templating.py |
| diffstat | 3 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES.txt Tue Nov 24 20:43:33 2009 +0000 +++ b/CHANGES.txt Sat Nov 28 22:44:02 2009 +0000 @@ -15,6 +15,8 @@ the tracker->web variable. Closes issue2537286, thanks to "stuidge" for reporting. - Fix some format errors in italian translation file +- Some bugs issue classifiers were causing database lookup errors + 2009-10-09 1.4.10 (r4374)
--- 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 """
--- a/test/test_templating.py Tue Nov 24 20:43:33 2009 +0000 +++ b/test/test_templating.py Sat Nov 28 22:44:02 2009 +0000 @@ -150,6 +150,7 @@ ae(t('http://roundup.net/'), '<a href="http://roundup.net/">http://roundup.net/</a>') ae(t('<HTTP://roundup.net/>'), '<<a href="HTTP://roundup.net/">HTTP://roundup.net/</a>>') ae(t('<www.roundup.net>'), '<<a href="http://www.roundup.net">www.roundup.net</a>>') + ae(t('item123123123123'), 'item123123123123') ''' class HTMLPermissions:
