From 9ee9932f3e8329307a6a4e5c5d7593fcafbd0a31 Mon Sep 17 00:00:00 2001 From: dangered wolf Date: Sun, 28 Aug 2022 04:17:14 -0400 Subject: [PATCH] Fix double URI decode bug in oembed --- src/server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server.ts b/src/server.ts index c844425..85d936b 100644 --- a/src/server.ts +++ b/src/server.ts @@ -177,10 +177,10 @@ router.get('/owoembed', async (request: Request) => { const [name, url] = Object.entries(motd)[random]; const test = { - author_name: decodeURIComponent(text), + author_name: text, author_url: `${Constants.TWITTER_ROOT}/${encodeURIComponent( author - )}/status/${encodeURIComponent(status)}`, + )}/status/${status}`, /* Change provider name if tweet is on deprecated domain. */ provider_name: searchParams.get('deprecated') === 'true'