Skip to content

Commit c7fe1ae

Browse files
author
Richard Jones
committed
relaxed hyperlinking in web interface (accept "issue123" or "Issue 123")
1 parent 66feb5b commit c7fe1ae

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Feature:
2626
("instant_registration" in config) (sf rfe 922209)
2727
- roundup-admin reindex command may now work on single items or classes
2828
- multiple selection Link/Multilink search field (thanks Marlon van den Berg)
29+
- relaxed hyperlinking in web interface (accept "issue123" or "Issue 123")
2930

3031

3132
2004-??-?? 0.7.7

roundup/cgi/templating.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def is_view_ok(self):
10881088
class StringHTMLProperty(HTMLProperty):
10891089
hyper_re = re.compile(r'((?P<url>\w{3,6}://\S+)|'
10901090
r'(?P<email>[-+=%/\w\.]+@[\w\.\-]+)|'
1091-
r'(?P<item>(?P<class>[a-z_]+)(?P<id>\d+)))')
1091+
r'(?P<item>(?P<class>[A-Za-z_]+)(\s*)?(?P<id>\d+)))')
10921092
def _hyper_repl(self, match):
10931093
if match.group('url'):
10941094
s = match.group('url')
@@ -1098,7 +1098,7 @@ def _hyper_repl(self, match):
10981098
return '<a href="mailto:%s">%s</a>'%(s, s)
10991099
else:
11001100
s = match.group('item')
1101-
s1 = match.group('class')
1101+
s1 = match.group('class').lower()
11021102
s2 = match.group('id')
11031103
try:
11041104
# make sure s1 is a valid tracker classname

0 commit comments

Comments
 (0)