From: richard Date: Sat, 28 Nov 2009 22:44:02 +0000 (+0000) Subject: issue2550549: Some bugs issue classifiers were causing database lookup errors X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=ca1fe022240b5283894a118a7a091a0d47acd62a;p=roundup.git issue2550549: Some bugs issue classifiers were causing database lookup errors git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4392 57a73879-2fb5-44c3-a270-3262357dd7e2 --- diff --git a/CHANGES.txt b/CHANGES.txt index ab4629e..ecd1235 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -15,6 +15,8 @@ Fixes: 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) diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index 4c7b2c9..6f0584f 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -1358,9 +1358,12 @@ class StringHTMLProperty(HTMLProperty): elif match.group('email'): s = match.group('email') return '%s'%(s, s) - else: + elif len(match.group('id')) < 10: return self._hyper_repl_item(match, '%(item)s') + else: + # just return the matched text + return match.group(0) def _hyper_repl_rst(self, match): if match.group('url'): @@ -1369,8 +1372,11 @@ class StringHTMLProperty(HTMLProperty): elif match.group('email'): s = match.group('email') return '`%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 """ diff --git a/test/test_templating.py b/test/test_templating.py index a580349..ad6d758 100644 --- a/test/test_templating.py +++ b/test/test_templating.py @@ -150,6 +150,7 @@ class HTMLClassTestCase(TemplatingTestCase) : ae(t('http://roundup.net/'), 'http://roundup.net/') ae(t('<HTTP://roundup.net/>'), '<HTTP://roundup.net/>') ae(t('<www.roundup.net>'), '<www.roundup.net>') + ae(t('item123123123123'), 'item123123123123') ''' class HTMLPermissions: