From 504c315d7bbb81fc8ff0fc4f8070a999ef444bc2 Mon Sep 17 00:00:00 2001 From: Lukas Brabec Date: Aug 31 2021 09:56:21 +0000 Subject: fix 'show more/less' when username contains '.' or '@' Fixes: https://pagure.io/fedora-qa/testdays-web/issue/24 --- diff --git a/testdays/templates/show_event.html b/testdays/templates/show_event.html index f56e964..d9c35c6 100644 --- a/testdays/templates/show_event.html +++ b/testdays/templates/show_event.html @@ -57,13 +57,14 @@ Click on the Enter result button {% for line in results[category.id] %} + {% set username_clean = line['username'] | replace('.', '_') | replace('@', '_') %} {{line['username']}} {% if line['profile']|length > 150 %} {{line['profile'][:150]}} - {{line['profile'][150:]}} - + {{line['profile'][150:]}} + {% else %} {{line['profile']}} {% endif %} @@ -94,8 +95,8 @@ Click on the Enter result button {% endfor %} {% if comment[1]|length > 200 %} {{comment[1][:200]}} - {{comment[1][200:]}} - + {{comment[1][200:]}} + {% else %} {{comment[1]}} {% endif %}