From c4fb75963ff800935baeb2d052056471b13ca4fb Mon Sep 17 00:00:00 2001 From: shinigami-eyes <43276258+shinigami-eyes@users.noreply.github.com> Date: Sun, 28 Jul 2019 07:41:49 +0200 Subject: [PATCH] Normalize Wikipedia identifiers --- extension/content.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/content.ts b/extension/content.ts index 53f73a9..f5efb4c 100644 --- a/extension/content.ts +++ b/extension/content.ts @@ -465,7 +465,7 @@ function getIdentifierFromURLImpl(url: URL): string { return null; } else if (domainIs(host, 'wikipedia.org') || domainIs(host, 'rationalwiki.org')) { if (url.hash || url.pathname.includes(':')) return null; - if (url.pathname.startsWith('/wiki/')) return 'wikipedia.org' + getPartialPath(url.pathname, 2); + if (url.pathname.startsWith('/wiki/')) return 'wikipedia.org' + decodeURIComponent(getPartialPath(url.pathname, 2)); else return null; } else if (host.indexOf('.blogspot.') != -1) { const m = captureRegex(host, /([a-zA-Z0-9\-]*)\.blogspot/);