Skip to content

Commit d0eb342

Browse files
committed
Updated render_email template tag to return its output with format_html.
1 parent 42a00dc commit d0eb342

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: companies/templatetags/companies.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from django import template
22
from django.template.defaultfilters import stringfilter
3+
from django.utils.html import format_html
4+
35

46
register = template.Library()
57

@@ -15,5 +17,5 @@ def render_email(value):
1517
mailbox = '<span>.</span>'.join(mailbox_tokens)
1618
domain = '<span>.</span>'.join(domain_tokens)
1719

18-
return '<span>@</span>'.join((mailbox, domain))
20+
return format_html('<span>@</span>'.join((mailbox, domain)))
1921
return None

0 commit comments

Comments
 (0)