aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2025-01-14 00:00:00 +0000
committertdro <tdro@noreply.example.com>2025-01-14 00:00:00 +0000
commit01e71f2a94f3a56e18b035dfd46ca6da13d4ad4e (patch)
treebffb74e60df47766a341bada902410841d2a0eef
parentc6cb9fc729cecf6145d95c56b2a64a9e033be93c (diff)
downloadcanory-01e71f2a94f3a56e18b035dfd46ca6da13d4ad4e.tar.gz
canory-01e71f2a94f3a56e18b035dfd46ca6da13d4ad4e.tar.bz2
canory-01e71f2a94f3a56e18b035dfd46ca6da13d4ad4e.zip
themes/default/layouts/partials/meta-title: Plainify start and end
Avoid shortcode loopback crashes, convert markdown leaks to plain text and unescape to preserve remaining entities
-rw-r--r--themes/default/layouts/partials/meta-title.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/themes/default/layouts/partials/meta-title.html b/themes/default/layouts/partials/meta-title.html
index 43c6f9d..304281d 100644
--- a/themes/default/layouts/partials/meta-title.html
+++ b/themes/default/layouts/partials/meta-title.html
@@ -1 +1,7 @@
-{{- or .Title .Summary | plainify | markdownify -}}
+{{- $title := or .Title .Summary -}}
+
+{{- $title = replace $title "{" "&#123;" -}}
+{{- $title = replace $title "}" "&#125;" -}}
+{{- $title = replace $title "!" "&#33;" -}}
+
+{{- $title | plainify | markdownify | plainify | htmlUnescape -}}