diff options
| author | tdro <tdro@noreply.example.com> | 2025-01-14 00:00:00 +0000 |
|---|---|---|
| committer | tdro <tdro@noreply.example.com> | 2025-01-14 00:00:00 +0000 |
| commit | 01e71f2a94f3a56e18b035dfd46ca6da13d4ad4e (patch) | |
| tree | bffb74e60df47766a341bada902410841d2a0eef | |
| parent | c6cb9fc729cecf6145d95c56b2a64a9e033be93c (diff) | |
| download | canory-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.html | 8 |
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 "{" "{" -}} +{{- $title = replace $title "}" "}" -}} +{{- $title = replace $title "!" "!" -}} + +{{- $title | plainify | markdownify | plainify | htmlUnescape -}} |
