From e183d420ea42838cc8ee40b28a0dec1addb6f046 Mon Sep 17 00:00:00 2001 From: TheAMM Date: Fri, 10 Nov 2017 05:50:57 +0200 Subject: [PATCH] Fix CF-stripped newlines for comments --- nyaa/templates/view.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nyaa/templates/view.html b/nyaa/templates/view.html index 02034b3..91adbda 100644 --- a/nyaa/templates/view.html +++ b/nyaa/templates/view.html @@ -171,12 +171,12 @@
{# Escape newlines into html entities because CF strips blank newlines #} -
{{ comment.text }}
+
{{- comment.text | escape | replace('\r\n', '\n') | replace('\n', ' '|safe) -}}
{% if g.user.id == comment.user_id %}
{{ comment_form.csrf_token }}
- +