From ad012a8297f38eb66cf5e5253c0323353956e9a8 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sat, 28 Mar 2026 07:34:20 -0300 Subject: content: linkExternal: fix decoding spaces etc --- src/content/dependencies/linkExternal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/content') diff --git a/src/content/dependencies/linkExternal.js b/src/content/dependencies/linkExternal.js index 53ff033f..e1393455 100644 --- a/src/content/dependencies/linkExternal.js +++ b/src/content/dependencies/linkExternal.js @@ -83,10 +83,11 @@ export default { let href; if (urlIsValid) { const {canonicalBase, canonicalMediaBase} = data; + const past = front => decodeURIComponent(url.slice(front.length)); if (canonicalMediaBase && url.startsWith(canonicalMediaBase)) { - href = to('media.path', url.slice(canonicalMediaBase.length)); + href = to('media.path', past(canonicalMediaBase)); } else if (canonicalBase && url.startsWith(canonicalBase)) { - href = to('shared.path', url.slice(canonicalBase.length)); + href = to('shared.path', past(canonicalBase)); } else { href = url; } -- cgit 1.3.0-6-gf8a5