Skip to content

Commit

Permalink
Fixed the escaping of an html string in the metadata description
Browse files Browse the repository at this point in the history
  • Loading branch information
pmoreno.rodriguez committed Jul 14, 2024
1 parent 03a159e commit 9116546
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions templates/partials/page-bits/metadata.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<meta name="og:site_name" property="og:site_name" content="{{ site.title|raw }}" />
{% endif %}
{% if not page.metadata["og:title"] %}
<meta name="og:title" property="og:title" content="{{ page.title|raw }}" />
<meta name="og:title" property="og:title" content="{{ page.title|e('html')|raw }}" />
{% endif %}
{% if not page.metadata["og:description"] %}
<meta name="og:description" property="og:description" content="{{ page.summary|striptags|truncate(150)|raw }}" />
<meta name="og:description" property="og:description" content="{{ page.summary|striptags|e('html')|truncate(150)|raw }}" />
{% endif %}
{% if not page.metadata["og:type"] %}
<meta name="og:type" property="og:type" content="article" />
Expand All @@ -38,10 +38,10 @@
{% endfor %}
{% endif %}
{% if not page.metadata["twitter:title"] %}
<meta name="twitter:title" property="twitter:title" content="{{ page.title|raw }}" />
<meta name="twitter:title" property="twitter:title" content="{{ page.title|e('html')|raw }}" />
{% endif %}
{% if not page.metadata["twitter:description"] %}
<meta name="twitter:description" property="twitter:description" content="{{ page.summary|striptags|truncate(150)|raw }}" />
<meta name="twitter:description" property="twitter:description" content="{{ page.summary|striptags|e('html')|truncate(150)|raw }}" />
{% endif %}
{% if not page.metadata["twitter:image"] and image %}
<meta name="twitter:image" property="twitter:image" content="{{ uri.base ~ image.url|raw }}" />
Expand Down

0 comments on commit 9116546

Please sign in to comment.