From 8be9e5dc1a0f88b55d5ec3ac46c75a72ac5736a0 Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@outlook.com>
Date: Wed, 2 Aug 2017 11:32:04 +0200
Subject: [PATCH] Make news items HTML-ready

---
 news/templates/news/news_card_content_for_api.html | 2 +-
 news/templates/news/news_card_content_short.html   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/news/templates/news/news_card_content_for_api.html b/news/templates/news/news_card_content_for_api.html
index 37e55edb2..0e2bd7c77 100644
--- a/news/templates/news/news_card_content_for_api.html
+++ b/news/templates/news/news_card_content_for_api.html
@@ -3,7 +3,7 @@
     <div>
         <h5 class="text-muted mb-2">{{date}}</h5>
         <div>
-            {{blurb|slice:":90"}} (...)
+            {{blurb|truncatechars_html:90|safe}}
 
             <br>
             <a href="{% url 'news:news' %}#news_{{id}}" class="my-1 d-inline-block">Read more</a>
diff --git a/news/templates/news/news_card_content_short.html b/news/templates/news/news_card_content_short.html
index 8565202ba..bcf34ac85 100644
--- a/news/templates/news/news_card_content_short.html
+++ b/news/templates/news/news_card_content_short.html
@@ -3,7 +3,7 @@
     <div>
         <h5 class="text-muted mb-2">{{news.date|date:'j F Y'}}</h5>
         <div>
-            {{news.blurb|slice:":90"}} (...)
+            {{news.blurb|truncatechars_html:90|safe}}
 
             <br>
             <a href="{% url 'news:news' %}#news_{{news.id}}" class="my-1 d-inline-block">Read more</a>
-- 
GitLab