From 3e921f2585a2b90a4b58e73a8f8b74be6869e0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pl=C3=B6ger?= <137512150+aplgr@users.noreply.github.com> Date: Sun, 25 Oct 2026 14:00:23 -0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20Encode=20article=20titles=20?= =?UTF-8?q?and=20permalinks=20in=20sharing=20links?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/sharing-links.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/sharing-links.html b/layouts/partials/sharing-links.html index e235d650..4a416055 100644 --- a/layouts/partials/sharing-links.html +++ b/layouts/partials/sharing-links.html @@ -1,12 +1,14 @@ {{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }} {{ $links := hugo.Data.sharing }} + {{ $pageURL := urlquery $.Permalink }} + {{ $pageTitle := urlquery $.Title }}
{{ range . }} {{ with index $links . }} {{ partial "icon.html" .icon }} From d6f7e07a0d9ba2ceb77b77931e0d06e9fce76b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pl=C3=B6ger?= <137512150+aplgr@users.noreply.github.com> Date: Sun, 25 Oct 2026 14:00:26 -0300 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20Encode=20Mastodon=20share=20?= =?UTF-8?q?text=20spaces=20in=20URL=20fragment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/sharing.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/sharing.json b/data/sharing.json index 32603fc6..6cda69ce 100644 --- a/data/sharing.json +++ b/data/sharing.json @@ -52,6 +52,6 @@ "mastodon": { "icon": "mastodon", "title": "sharing.mastodon", - "url": "https://share.joinmastodon.org/#text=%[2]s %[1]s" + "url": "https://share.joinmastodon.org/#text=%[2]s%%20%[1]s" } } From c463e4adb766787866f103f190471fe188bbc264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Pl=C3=B6ger?= <137512150+aplgr@users.noreply.github.com> Date: Sun, 25 Oct 2026 14:00:40 -0300 Subject: [PATCH 3/3] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Keep=20provider-specif?= =?UTF-8?q?ic=20URL=20encoding=20explicit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/sharing-links.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/layouts/partials/sharing-links.html b/layouts/partials/sharing-links.html index 4a416055..c8e5bb5a 100644 --- a/layouts/partials/sharing-links.html +++ b/layouts/partials/sharing-links.html @@ -2,13 +2,15 @@ {{ $links := hugo.Data.sharing }} {{ $pageURL := urlquery $.Permalink }} {{ $pageTitle := urlquery $.Title }} + {{ $mastodonURL := replace $pageURL "+" "%20" }} + {{ $mastodonTitle := replace $pageTitle "+" "%20" }}
{{ range . }} {{ with index $links . }} {{ partial "icon.html" .icon }}