From 5d3848a445f97e4e1310758f43a55ec1fe0dbc71 Mon Sep 17 00:00:00 2001 From: Sven Steinbauer Date: Wed, 2 Mar 2016 12:31:28 +0000 Subject: [PATCH] Add `striptags` to summary before truncate Summary might be truncated inside an HTML tag. Summaries no longer have HTML tags, but this prevents unclosed tags in the summary which can interfere with the rest of the layout --- templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/index.html b/templates/index.html index 98f8bce..880b8f8 100755 --- a/templates/index.html +++ b/templates/index.html @@ -39,7 +39,7 @@ {% elif article.has_summary %} {{ article.summary }} {% elif article.summary %} - {{ article.summary|truncate(140) }} + {{ article.summary|striptags|truncate(140) }} {% endif %}

Posted by {% for author in article.authors %}