Skip to content

Commit

Permalink
fix: Add mark_safe to person_link to prevent HTML escaping
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert committed Jul 18, 2023
1 parent 0693a43 commit c7a075b
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ietf/person/templatetags/person_filters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright The IETF Trust 2017-2020, All Rights Reserved

from django import template
from django.utils.html import mark_safe

import debug # pyflakes:ignore

Expand Down Expand Up @@ -59,11 +60,11 @@ def person_link(person, **kwargs):
)
email = person.email_address()
return {
"name": name,
"plain_name": plain_name,
"email": email,
"title": title,
"class": cls,
"name": mark_safe(name),
"plain_name": mark_safe(plain_name),
"email": mark_safe(email),
"title": mark_safe(title),
"class": mark_safe(cls),
"with_email": with_email,
}
else:
Expand All @@ -83,10 +84,10 @@ def email_person_link(email, **kwargs):
)
email = email.address
return {
"name": name,
"plain_name": plain_name,
"email": email,
"title": title,
"class": cls,
"name": mark_safe(name),
"plain_name": mark_safe(plain_name),
"email": mark_safe(email),
"title": mark_safe(title),
"class": mark_safe(cls),
"with_email": with_email,
}

0 comments on commit c7a075b

Please sign in to comment.