From 95679599de538a4833dd873f0630e5819b60db10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez-Cerezo?= Date: Fri, 6 Jul 2018 23:21:49 +0200 Subject: prevent html injection --- templates/bug.html | 8 ++++---- templates/buglist.html | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/bug.html b/templates/bug.html index 7f58780..fc891fa 100644 --- a/templates/bug.html +++ b/templates/bug.html @@ -11,17 +11,17 @@

Hemiptera Bugtracker at {{DOMAIN}}

{{prname}}

- {{ replies[0]["Subject"] }} + {{ replies[0]["Subject"]|e }}

Send replies to {{ bug.id }}@{{ DOMAIN }} {% for i in replies %}
- avatar From: {% if i["From"] == replies[0]["From"] %} OP {% elif i["From"] in devs %} Developer {% else %} Someone else {% endif %}
{{ i["Date"] }} + avatar From: {% if i["From"] == replies[0]["From"] %} OP {% elif i["From"] in devs %} Developer {% else %} Someone else {% endif %}
{{ i["Date"] |e}}
-

{{ i.get_body("plain").get_content().replace("\n", "

") }}

+

{{ i.get_body("plain").get_content()|e|replace("\n", "

") }}

{% endfor %} @@ -30,7 +30,7 @@
avatar Status Update
- {{ bug.closeddate }} + {{ bug.closeddate|e}}
This bug was closed. diff --git a/templates/buglist.html b/templates/buglist.html index 3e69108..142dc69 100644 --- a/templates/buglist.html +++ b/templates/buglist.html @@ -29,12 +29,12 @@ {{ i.id }} - {{ i.subject }} + {{ i.subject|e }} {{ i.replies }} - + {{ i.nicecreated }} - + {{ i.nicereply }} {% if i.closed %} -- cgit v1.2.3