From db44af2e5200d57b85d67c9206be4c652d501641 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Mon, 3 Feb 2025 22:47:14 +0000 Subject: [PATCH] Fix ????s in interaction names These arrive because webmentions.io can't cope with inbound emoji. Until that's fixed, this strips the ???s out at render time, to keep things looking nice. --- layouts/partials/interactions.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/partials/interactions.html b/layouts/partials/interactions.html index a07c1007..04f18064 100644 --- a/layouts/partials/interactions.html +++ b/layouts/partials/interactions.html @@ -53,7 +53,7 @@ {{ continue }} {{ end }}
  • - {{ .author.name }}: {{ .comment }} + {{ .author.name | replaceRE `(\?\x{200D}?){2,}` "" | strings.TrimSpace }}: {{ .comment }} ({{ partial "rel-date.html" (dict "time" .timestamp "rel" $.Page.PublishDate) }})
  • {{ end }} @@ -65,7 +65,7 @@
  • {{ partial "partials/reactionsvg.html" (dict "emoji" $thisEm "name" true) -}} {{- range $i, $in := $items -}} - {{ $in.author.name }} + {{ $in.author.name | replaceRE `(\?\x{200D}?){2,}` "" | strings.TrimSpace }} {{- if ne $i (sub (len $items) 1) }}, {{ end -}} {{- end -}}