🐛 fix: allow quotation in page summary

Quotation marks were being escaped, as the `safe` filter was not being used.
main
welpo 9 months ago
parent f5f195c90c
commit 22925caf06
No known key found for this signature in database
GPG Key ID: A2F978CF4EC1F5A6

@ -69,7 +69,7 @@
<content type="html">{{ page.content }}</content> <content type="html">{{ page.content }}</content>
{% endif -%} {% endif -%}
{% if page.summary -%} {% if page.summary -%}
<summary type="html">{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…</summary> <summary type="html">{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}…</summary>
{% elif page.description -%} {% elif page.description -%}
<summary type="html">{{ page.description }}</summary> <summary type="html">{{ page.description }}</summary>
{% endif -%} {% endif -%}

@ -36,7 +36,7 @@
{% if post.description %} {% if post.description %}
<p>{{ post.description }}</p> <p>{{ post.description }}</p>
{% elif post.summary %} {% elif post.summary %}
<p>{{ post.summary | striptags | safe | trim_end_matches(pat=".") }}…</p> <p>{{ post.summary | striptags | trim_end_matches(pat=".") | safe }}…</p>
{% endif %} {% endif %}
</div> </div>
<a class="readmore" href={{ post.permalink }}>{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }}&nbsp;<span class="arrow"></span></a> <a class="readmore" href={{ post.permalink }}>{{ macros_translate::translate(key="read_more", default="Read more", language_strings=language_strings) }}&nbsp;<span class="arrow"></span></a>

@ -69,8 +69,8 @@
<meta name="description" content="{{ section.description }}" /> <meta name="description" content="{{ section.description }}" />
<meta property="og:description" content="{{ section.description }}" /> <meta property="og:description" content="{{ section.description }}" />
{%- elif page.summary %} {%- elif page.summary %}
<meta name="description" content="{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}" /> <meta name="description" content="{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}" />
<meta property="og:description" content="{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}" /> <meta property="og:description" content="{{ page.summary | striptags | trim_end_matches(pat=".") | safe }}" />
{%- else %} {%- else %}
<meta name="description" content="{{ config.description }}" /> <meta name="description" content="{{ config.description }}" />
<meta property="og:description" content="{{ config.description }}" /> <meta property="og:description" content="{{ config.description }}" />

Loading…
Cancel
Save