Skip to content

Commit e59224c

Browse files
committed
Fix history text formatter: sanitize HTML before adding linebreaks and
non-breaking spaces, this cuts the time to render a history page with long comments in half - Legacy-Id: 5310
1 parent 0dc4725 commit e59224c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/idtracker/templatetags/ietf_filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ def format_history_text(text):
466466
if text.startswith("This was part of a ballot set with:"):
467467
full = urlize_ietf_docs(full)
468468

469-
full = mark_safe(sanitize_html(keep_spacing(linebreaksbr(urlize(full)))))
469+
full = mark_safe(keep_spacing(linebreaksbr(urlize(sanitize_html(full)))))
470470
snippet = truncate_html_words(full, 25)
471471
if snippet != full:
472472
return mark_safe(u'<div class="snippet">%s<span class="showAll">[show all]</span></div><div style="display:none" class="full">%s</div>' % (snippet, full))

0 commit comments

Comments
 (0)