From 84a05319f1fd3ab98049a4f38b9af4908efd2ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Tue, 12 Mar 2024 16:54:34 +0100 Subject: [PATCH] hub: do not insert extra newlines to logs on page reloads Any text between the `
` tags was interpreted literally, including line
feed characters.
---
 kobo/hub/templates/task/log.html | 5 +----
 tests/test_view_log.py           | 4 ++--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/kobo/hub/templates/task/log.html b/kobo/hub/templates/task/log.html
index cd6f9099..2fc429a1 100644
--- a/kobo/hub/templates/task/log.html
+++ b/kobo/hub/templates/task/log.html
@@ -14,8 +14,5 @@
 

{% trans 'Task' %} #{{ task.id }} - {{ log_name }}

{% trans "back to task" %} #{{ task.id }}
{% trans 'download' %} -
-{{ content }}
-
- +
{{ content }}
{% endblock %} diff --git a/tests/test_view_log.py b/tests/test_view_log.py index 9dd514c4..08ec60b1 100644 --- a/tests/test_view_log.py +++ b/tests/test_view_log.py @@ -196,7 +196,7 @@ def test_view_html_wrapped(self): # The response is expected to be wrapped in some view. # We are only doing a very basic verification of the view here self.assertTrue(content.startswith('") in content, content) + self.assertTrue((small_log_content() + "
") in content, content) # No trimming necessary self.assertFalse('...trimmed, download required for full log' in content) @@ -210,7 +210,7 @@ def test_view_tiny_html_wrapped(self): ) self.assertTrue(content.startswith('") in content, content) + self.assertTrue((tiny_log_content() + "") in content, content) self.assertFalse('...trimmed, download required for full log' in content) @profile