From f9112bd8833d08fc0b7a120c330d213e6e656a33 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 9 Apr 2020 15:48:21 +1000 Subject: [PATCH] Revert "Decode request.query_string before use." This reverts commit b6fba854007bb4392846085a60178c44dbd7989e. --- .../templates/mediagoblin/plugins/openid/login.html | 5 +++-- .../mediagoblin/plugins/openid/login_link.html | 2 +- .../mediagoblin/moderation/report_panel.html | 12 ++++++------ .../templates/mediagoblin/moderation/user_panel.html | 6 +++--- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login.html b/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login.html index 4ebfdf54..193a3b2d 100644 --- a/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login.html +++ b/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login.html @@ -41,13 +41,13 @@ {% endif %} {% if allow_registration %}

- {% trans %}Log in to create an account!{% endtrans %} + {% trans %}Log in to create an account!{% endtrans %}

{% endif %} {% template_hook('login_link') %} {% if pass_auth is defined %}

- + {%- trans %}Or login with a password!{% endtrans %}

@@ -63,3 +63,4 @@ {% endblock %} + diff --git a/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login_link.html b/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login_link.html index 78d66745..fa4d5e85 100644 --- a/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login_link.html +++ b/mediagoblin/plugins/openid/templates/mediagoblin/plugins/openid/login_link.html @@ -19,7 +19,7 @@ {% block openid_login_link %} {% if openid_link is defined %}

- + {%- trans %}Or login with OpenID!{% endtrans %}

diff --git a/mediagoblin/templates/mediagoblin/moderation/report_panel.html b/mediagoblin/templates/mediagoblin/moderation/report_panel.html index 52a6ad87..c82cd412 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report_panel.html +++ b/mediagoblin/templates/mediagoblin/moderation/report_panel.html @@ -35,10 +35,10 @@

{% trans %}Active Reports Filed{% endtrans %}

{% if report_list.count() %} {% if not active_settings.last_page == 1 %} - {% if 'active_p='~active_settings.current_page in request.query_string.decode() %} - {% set query_string = request.query_string.decode() %}{% else %} + {% if 'active_p='~active_settings.current_page in request.query_string %} + {% set query_string = request.query_string %}{% else %} {% set query_string = -'active_p='~active_settings.current_page~"&"+request.query_string.decode() %} +'active_p='~active_settings.current_page~"&"+request.query_string %} {% endif %}
{% set first_vis = active_settings.current_page-3 %} @@ -127,10 +127,10 @@ curr_page !=p %}

{% trans %}Closed Reports{% endtrans %}

{% if closed_report_list.count() %} {% if not closed_settings.last_page == 1 %} - {% if 'closed_p='~closed_settings.current_page in request.query_string.decode() %} - {% set query_string = request.query_string.decode() %}{% else %} + {% if 'closed_p='~closed_settings.current_page in request.query_string %} + {% set query_string = request.query_string %}{% else %} {% set query_string = -'closed_p='~closed_settings.current_page~"&"+request.query_string.decode() %} +'closed_p='~closed_settings.current_page~"&"+request.query_string %} {% endif %}
{% set first_vis = closed_settings.current_page-3 %} diff --git a/mediagoblin/templates/mediagoblin/moderation/user_panel.html b/mediagoblin/templates/mediagoblin/moderation/user_panel.html index 4046fecd..4949960e 100644 --- a/mediagoblin/templates/mediagoblin/moderation/user_panel.html +++ b/mediagoblin/templates/mediagoblin/moderation/user_panel.html @@ -35,10 +35,10 @@ {% if user_list.count() %} {% if not last_page == 1 %} - {% if 'p='~current_page in request.query_string.decode() %} - {% set query_string = request.query_string.decode() %}{% else %} + {% if 'p='~current_page in request.query_string %} + {% set query_string = request.query_string %}{% else %} {% set query_string = -'p='~current_page~"&"+request.query_string.decode() %} +'p='~current_page~"&"+request.query_string %} {% endif %}
{% set first_vis = current_page-3 %} -- 2.25.1