diff -r 7132c780c686 roundup/cgi/templating.py --- a/roundup/cgi/templating.py Sun Nov 15 15:17:10 2020 -0500 +++ b/roundup/cgi/templating.py Sun Nov 22 15:48:00 2020 +0100 @@ -1686,7 +1686,7 @@ ('(', ')'), }: continue - if prefix == '(' and match.string[end - 1] == ')': + if prefix == '(' and ')' in match.group(group): continue s = match.group(group) return '<%s>' % s diff -r 7132c780c686 test/test_templating.py --- a/test/test_templating.py Sun Nov 15 15:17:10 2020 -0500 +++ b/test/test_templating.py Sun Nov 22 15:48:00 2020 +0100 @@ -566,6 +566,11 @@ m = self.mangleMarkdown2(m) self.assertEqual(m.rstrip('\n'), '

label

') + p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'[label](http://example.com/).')) + m = p.markdown(hyperlink=1) + m = self.mangleMarkdown2(m) + self.assertEqual(m.rstrip('\n'), '

label.

') + p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'![](http://example.com/)')) m = p.markdown(hyperlink=1) m = self.mangleMarkdown2(m)