mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
Fix old xss prevention only removing first less than symbol
This commit is contained in:
@@ -68,7 +68,7 @@ export async function getVideoBranding(res: Response, videoID: VideoID, service:
|
|||||||
const casualVotes = getCasualVotes();
|
const casualVotes = getCasualVotes();
|
||||||
|
|
||||||
for (const title of await titles) {
|
for (const title of await titles) {
|
||||||
title.title = title.title.replace("<", "‹");
|
title.title = title.title.replaceAll("<", "‹");
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -160,7 +160,7 @@ export async function getVideoBrandingByHash(videoHashPrefix: VideoIDHash, servi
|
|||||||
};
|
};
|
||||||
|
|
||||||
(await branding.titles).forEach((title) => {
|
(await branding.titles).forEach((title) => {
|
||||||
title.title = title.title.replace("<", "‹");
|
title.title = title.title.replaceAll("<", "‹");
|
||||||
|
|
||||||
initResult(title);
|
initResult(title);
|
||||||
dbResult[title.videoID].titles.push(title);
|
dbResult[title.videoID].titles.push(title);
|
||||||
|
|||||||
Reference in New Issue
Block a user