From aa90950c84c045419707bd4ea2b989de1aa10a2c Mon Sep 17 00:00:00 2001
From: Jonathan Weth <git@jonathanweth.de>
Date: Thu, 11 Mar 2021 10:51:22 +0100
Subject: [PATCH] Render line breaks in notification descriptions as <br> tags

---
 aleksis/core/templates/core/index.html                    | 2 +-
 aleksis/core/templates/core/notifications.html            | 2 +-
 aleksis/core/templates/templated_email/notification.email | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/aleksis/core/templates/core/index.html b/aleksis/core/templates/core/index.html
index b690155f0..70103f517 100644
--- a/aleksis/core/templates/core/index.html
+++ b/aleksis/core/templates/core/index.html
@@ -32,7 +32,7 @@
         </div>
 
         <strong>{{ notification.title }}</strong>
-        <p>{{ notification.description }}</p>
+        <p>{{ notification.description|linebreaks }}</p>
       </div>
     </div>
   {% endfor %}
diff --git a/aleksis/core/templates/core/notifications.html b/aleksis/core/templates/core/notifications.html
index a49bc9e8e..499bbcc4c 100644
--- a/aleksis/core/templates/core/notifications.html
+++ b/aleksis/core/templates/core/notifications.html
@@ -16,7 +16,7 @@
             <i class="material-icons left">access_time</i> {{ notification.created }}
           </p>
           <p>
-            {{ notification.description }}
+            {{ notification.description|linebreaks }}
           </p>
           {% if notification.link %}
             <p>
diff --git a/aleksis/core/templates/templated_email/notification.email b/aleksis/core/templates/templated_email/notification.email
index 0e5d9bdee..68a3e7957 100644
--- a/aleksis/core/templates/templated_email/notification.email
+++ b/aleksis/core/templates/templated_email/notification.email
@@ -30,7 +30,7 @@
 
     <blockquote>
         <h5>{{ notification.title }}</h5>
-        <p>{{ notification.description }}</p>
+        <p>{{ notification.description|linebreaks }}</p>
         {% if notification.link %}
             <a href="{{ notification.link }}">{% trans "More information" %} →</a>
         {% endif %}
-- 
GitLab