From 3711286ef2384d99cdf8ec4afba47d1e2a994722 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 30 Jul 2025 01:26:02 -0400 Subject: [PATCH] Fix old xss prevention only removing first less than symbol --- src/routes/getBranding.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routes/getBranding.ts b/src/routes/getBranding.ts index f89a5fd..1045a2d 100644 --- a/src/routes/getBranding.ts +++ b/src/routes/getBranding.ts @@ -68,7 +68,7 @@ export async function getVideoBranding(res: Response, videoID: VideoID, service: const casualVotes = getCasualVotes(); for (const title of await titles) { - title.title = title.title.replace("<", "‹"); + title.title = title.title.replaceAll("<", "‹"); } return { @@ -160,7 +160,7 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi }; (await branding.titles).forEach((title) => { - title.title = title.title.replace("<", "‹"); + title.title = title.title.replaceAll("<", "‹"); initResult(title); dbResult[title.videoID].titles.push(title);