From ce8c4c649d9ea2bea80f892958d128e67bd59a34 Mon Sep 17 00:00:00 2001 From: Mira Weller Date: Mon, 29 Jun 2026 22:15:16 +0200 Subject: [PATCH] Replace |safe with |escapejson where appropriate --- .../control/templates/pretixcontrol/auth/login_2fa.html | 4 ++-- .../templates/pretixcontrol/user/2fa_confirm_totp.html | 8 ++------ .../pretixcontrol/user/2fa_confirm_webauthn.html | 5 ++--- .../control/templates/pretixcontrol/user/reauth.html | 3 ++- src/pretix/helpers/escapejson.py | 2 +- .../stripe/static/pretixplugins/stripe/pretix-stripe.js | 4 ++-- .../stripe/templates/pretixplugins/stripe/sca.html | 2 +- 7 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/pretix/control/templates/pretixcontrol/auth/login_2fa.html b/src/pretix/control/templates/pretixcontrol/auth/login_2fa.html index 760769b3a5..d5370a45a7 100644 --- a/src/pretix/control/templates/pretixcontrol/auth/login_2fa.html +++ b/src/pretix/control/templates/pretixcontrol/auth/login_2fa.html @@ -3,6 +3,7 @@ {% load i18n %} {% load static %} {% load compress %} +{% load escapejson %} {% block content %}
{% csrf_token %} @@ -30,8 +31,7 @@
{% if jsondata %} {% endif %} {% compress js %} diff --git a/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_totp.html b/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_totp.html index a25ca03cf7..a0b4489f3e 100644 --- a/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_totp.html +++ b/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_totp.html @@ -1,6 +1,7 @@ {% extends "pretixcontrol/base.html" %} {% load i18n %} {% load bootstrap3 %} +{% load escapejson %} {% block title %}{% trans "Add a two-factor authentication device" %}{% endblock %} {% block content %}

{% trans "Add a two-factor authentication device" %}

@@ -32,7 +33,7 @@
  • {% trans "Add a new account to the app by scanning the following barcode:" %} -
    +

    {% trans "Can't scan the barcode?" %} @@ -81,9 +82,4 @@

  • - {% endblock %} diff --git a/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_webauthn.html b/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_webauthn.html index 1b064b8aab..f03b03fe5f 100644 --- a/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_webauthn.html +++ b/src/pretix/control/templates/pretixcontrol/user/2fa_confirm_webauthn.html @@ -3,6 +3,7 @@ {% load bootstrap3 %} {% load static %} {% load compress %} +{% load escapejson %} {% block title %}{% trans "Add a two-factor authentication device" %}{% endblock %} {% block content %}

    {% trans "Add a two-factor authentication device" %}

    @@ -26,9 +27,7 @@ {% trans "Device registration failed." %} {% compress js %} diff --git a/src/pretix/control/templates/pretixcontrol/user/reauth.html b/src/pretix/control/templates/pretixcontrol/user/reauth.html index 797e5ef58d..caa61ed0ae 100644 --- a/src/pretix/control/templates/pretixcontrol/user/reauth.html +++ b/src/pretix/control/templates/pretixcontrol/user/reauth.html @@ -3,6 +3,7 @@ {% load bootstrap3 %} {% load compress %} {% load static %} +{% load escapejson %} {% block content %}