From 22925caf060d122630c02437c5fc73bc6b82e457 Mon Sep 17 00:00:00 2001 From: welpo Date: Thu, 30 May 2024 14:12:44 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20allow=20quotation=20in=20?= =?UTF-8?q?page=20summary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Quotation marks were being escaped, as the `safe` filter was not being used. --- templates/atom.xml | 2 +- templates/macros/list_posts.html | 2 +- templates/partials/header.html | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/templates/atom.xml b/templates/atom.xml index 10824dc..4f59410 100644 --- a/templates/atom.xml +++ b/templates/atom.xml @@ -69,7 +69,7 @@ {{ page.content }} {% endif -%} {% if page.summary -%} - {{ page.summary | striptags | safe | trim_end_matches(pat=".") }}… + {{ page.summary | striptags | trim_end_matches(pat=".") | safe }}… {% elif page.description -%} {{ page.description }} {% endif -%} diff --git a/templates/macros/list_posts.html b/templates/macros/list_posts.html index 8c2e1bf..1063cd5 100644 --- a/templates/macros/list_posts.html +++ b/templates/macros/list_posts.html @@ -36,7 +36,7 @@ {% if post.description %}

{{ post.description }}

{% elif post.summary %} -

{{ post.summary | striptags | safe | trim_end_matches(pat=".") }}…

+

{{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…

{% endif %} {{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }}  diff --git a/templates/partials/header.html b/templates/partials/header.html index 8b82ddf..5645edd 100644 --- a/templates/partials/header.html +++ b/templates/partials/header.html @@ -69,8 +69,8 @@ {%- elif page.summary %} - - + + {%- else %}