Additional HTML escaping for titles and metadata (#5276)

This commit is contained in:
Pander
2025-07-11 09:43:17 +08:00
committed by GitHub
parent 0ce3ef6bd8
commit 36271d15f5
4 changed files with 9 additions and 7 deletions
+3 -3
View File
@@ -39,15 +39,15 @@
<meta name="description" content="{{ seo_description }}">
{% if author.name %}
<meta name="author" content="{{ author.name | default: author }}">
<meta name="author" content="{{ author.name | default: author | escape_once | strip }}">
{% if og_type == "article" %}
<meta property="article:author" content="{{ author.name | default: author }}">
<meta property="article:author" content="{{ author.name | default: author | escape_once | strip }}">
{% endif %}
{% endif %}
<meta property="og:type" content="{{ og_type }}">
<meta property="og:locale" content="{{ site.locale | replace: "-", "_" | default: "en_US" }}">
<meta property="og:site_name" content="{{ site.title }}">
<meta property="og:site_name" content="{{ site.title | escape_once | strip }}">
<meta property="og:title" content="{{ page_title }}">
<meta property="og:url" content="{{ canonical_url }}">