« get me outta code hell

external-links: decode uri for youtube handles - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-04-28 18:47:47 -0300
committer(quasar) nebula <qznebula@protonmail.com>2026-04-28 18:47:47 -0300
commitb5a39072f45681d5bda971828f64fe97848151fd (patch)
tree1b1f95e2011abee1d70e672460f8cdc4e9112ced
parent1fbf8a62bdd81b099289f6994e4eb003ebf1d835 (diff)
external-links: decode uri for youtube handles
-rw-r--r--src/external-links.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/external-links.js b/src/external-links.js
index 06570067..fa4a832e 100644
--- a/src/external-links.js
+++ b/src/external-links.js
@@ -701,7 +701,13 @@ export const externalLinkSpec = [
     match: {domain: 'youtube.com'},
 
     platform: 'youtube',
-    handle: {pathname: /^@([^/]+)\/?$/},
+
+    handle: {
+      pathname: /^@([^/]+)\/?$/,
+      transform: [
+        {command: 'decode-uri'},
+      ],
+    },
 
     icon: 'youtube',
   },