diff --git a/news/templates/news/news_card_content_for_api.html b/news/templates/news/news_card_content_for_api.html index 37e55edb21ba3131115cc549fe48d0aeea2d0bbd..0e2bd7c77767a6b5b2ab23a4570709ab4323fcd5 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 8565202ba8833c425769a0f073fd5a8338a47832..bcf34ac858fc6d4f9c702def2e7b81b1fb74a925 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>