From 9e669eaf05b999406851072d92ae40ee24bfd495 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 6 May 2026 10:57:21 +0200 Subject: [PATCH] Decode percent-escapes in OG card route segments --- workers/open-graph/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/workers/open-graph/index.js b/workers/open-graph/index.js index 766aa0b86..b27a3712b 100644 --- a/workers/open-graph/index.js +++ b/workers/open-graph/index.js @@ -38,7 +38,16 @@ function ensureInit() { } function parseRoute(pathname) { - const segments = pathname.replace(/^\//, "").split("/"); + const segments = pathname + .replace(/^\//, "") + .split("/") + .map(s => { + try { + return decodeURIComponent(s); + } catch { + return s; + } + }); const first = segments[0]; if (first === "" || first === undefined) return { type: "home" };