Opened 11 years ago
Last modified 4 years ago
#10958 new defect
Exception while processing email links without EMAIL_VIEW privilege — at Version 2
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | high | Component: | MarkdownMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: |
Description (last modified by )
When markdown content contains email links like this:
[test](mailto:email@example.com)
and viewer doesn't have EMAIL_VIEW permission, it end up with exception (AttributeError: 'NoneType' object has no attribute 'group'
).
Trac converts such links (Formatter called from Markdown/macro.py) to:
<p>email@… </p>
which doesn't match to HREF regexp. This causes exception on line 48 in Markdown/macro.py:
url = re.search(HREF, out.getvalue()).groups()[0]
MarkdownMacro 0.11.2
Attached some workaround patch.
Change History (3)
Changed 11 years ago by
Attachment: | markdown-email.patch added |
---|
comment:1 Changed 11 years ago by
Owner: | changed from Douglas Clifton to Ryan J Ollos |
---|---|
Priority: | normal → high |
Status: | new → assigned |
Thanks for the patch.
comment:2 Changed 11 years ago by
Description: | modified (diff) |
---|
Note: See
TracTickets for help on using
tickets.
workaround patch