Skip to content

Commit

Permalink
Format emails to mailto hyperlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed May 21, 2024
1 parent 3a9d15e commit 9b91a38
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/feature_info_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,11 @@ def render_value(self, value, htmlEscape=True):
r'^(https?:\/\/.*)$',
lambda m: m.expand(r'<a href="\1" target="_blank">Link</a>')
))
# E-Mails
rules.append((
r'^([\w\-\.]+@([\w-]+\.)+[\w-]{2,4})$',
lambda m: m.expand(r'<a href="mailto:\1">\1</a>')
))
# Attachments
rules.append((
r'^attachment://(.+)/([^/]+)$',
Expand Down

0 comments on commit 9b91a38

Please sign in to comment.