Skip to content

Commit

Permalink
🐛 fix: remove unnecessary description filters
Browse files Browse the repository at this point in the history
It caused issues if description contained double quotes.
  • Loading branch information
welpo committed Oct 23, 2023
1 parent 01d5322 commit 6673a06
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion templates/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{% if page.summary -%}
<summary type="html">{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…</summary>
{% elif page.description -%}
<summary type="html">{{ page.description | striptags | safe }}</summary>
<summary type="html">{{ page.description }}</summary>
{% endif -%}
</entry>
{%- endfor %}
Expand Down
2 changes: 1 addition & 1 deletion templates/macros/list_posts.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2 class="bloglist-title">

<div class="description">
{% if post.description %}
<p>{{ post.description | striptags | safe }}</p>
<p>{{ post.description }}</p>
{% elif post.summary %}
<p>{{ post.summary | striptags | safe | trim_end_matches(pat=".") }}…</p>
{% endif %}
Expand Down
8 changes: 4 additions & 4 deletions templates/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
{%- endif -%}

{%- if page.description %}
<meta name="description" content="{{ page.description | striptags | safe }}" />
<meta property="og:description" content="{{ page.description | striptags | safe }}" />
<meta name="description" content="{{ page.description }}" />
<meta property="og:description" content="{{ page.description }}" />
{%- elif section.description %}
<meta name="description" content="{{ section.description | striptags | safe }}" />
<meta property="og:description" content="{{ section.description | striptags | safe }}" />
<meta name="description" content="{{ section.description }}" />
<meta property="og:description" content="{{ section.description }}" />
{%- elif page.summary %}
<meta name="description" content="{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…" />
<meta property="og:description" content="{{ page.summary | striptags | safe | trim_end_matches(pat=".") }}…" />
Expand Down

0 comments on commit 6673a06

Please sign in to comment.