Opened 11 years ago

Last modified 4 years ago

#10958 new defect

Exception while processing email links without EMAIL_VIEW privilege — at Initial Version

Reported by: marmarek@… Owned by: Douglas Clifton
Priority: high Component: MarkdownMacro
Severity: normal Keywords:
Cc: Trac Release:

Description

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 convert 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 (1)

Changed 11 years ago by marmarek@…

Attachment: markdown-email.patch added

workaround patch

Note: See TracTickets for help on using tickets.