From 5a2a88cab1497419bc952e847c3b8cce4d8b27b6 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Wed, 24 Apr 2024 12:15:57 -0700 Subject: [PATCH] [PATCH] tpl/tplimpl: Fix double-escaping in opengraph template cherry-picked from gohugoio/hugo@fb51b69 --- layouts/partials/templates/opengraph.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/layouts/partials/templates/opengraph.html b/layouts/partials/templates/opengraph.html index ca745ee1..90b91d28 100644 --- a/layouts/partials/templates/opengraph.html +++ b/layouts/partials/templates/opengraph.html @@ -4,11 +4,11 @@ {{- end }} -{{- with or .Title site.Title site.Params.title | plainify}} +{{- with or .Title site.Title site.Params.title | plainify }} {{- end }} -{{- with or .Description .Summary site.Params.description | plainify }} +{{- with or .Description .Summary site.Params.description | plainify | htmlUnescape | chomp }} {{- end }} @@ -18,7 +18,9 @@ {{- if .IsPage }} - + {{- with .Section }} + + {{- end }} {{- $ISO8601 := "2006-01-02T15:04:05-07:00" }} {{- with .PublishDate }}