From c64baad181232dd4baacd17f490545fa708f7f5a Mon Sep 17 00:00:00 2001 From: cuom1999 Date: Thu, 5 Oct 2023 01:09:09 -0500 Subject: [PATCH] Fix xss --- templates/contest/list.html | 96 ++++++++++++++++++------------------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/templates/contest/list.html b/templates/contest/list.html index 226b219..184a70e 100644 --- a/templates/contest/list.html +++ b/templates/contest/list.html @@ -112,56 +112,54 @@ {% endblock %} {% macro contest_head(contest) %} - {% spaceless %} - - {{- contest.name -}} - -
-
- {% if not contest.is_visible %} - - {{ _('hidden') }} - + + {{contest.name}} + +
+
+ {% if not contest.is_visible %} + + {{ _('hidden') }} + + {% endif %} + {% if contest.is_editable %} + + + {{ _('Edit') }} + + + {% endif %} + {% if contest.is_private %} + + {{ _('private') }} + + {% endif %} + {% if not hide_contest_orgs %} + {% if contest.is_organization_private %} + {% for org in contest.organizations.all() %} + + + {{ org.name }} + + + {% endfor %} {% endif %} - {% if contest.is_editable %} - - - {{ _('Edit') }} - - - {% endif %} - {% if contest.is_private %} - - {{ _('private') }} - - {% endif %} - {% if not hide_contest_orgs %} - {% if contest.is_organization_private %} - {% for org in contest.organizations.all() %} - - - {{ org.name }} - - - {% endfor %} - {% endif %} - {% endif %} - {% if contest.is_rated %} - - {{ _('rated') }} - - {% endif %} - {% for tag in contest.tags.all() %} - - - {{- tag.name -}} - - - {% endfor %} -
- {% endspaceless %} + {% endif %} + {% if contest.is_rated %} + + {{ _('rated') }} + + {% endif %} + {% for tag in contest.tags.all() %} + + + {{- tag.name -}} + + + {% endfor %} +
{% endmacro %} {% macro time_left(contest, padding_top = true) %}