From 5abdeb193e2a36a266ae66f0b0ddc145d0617e33 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 7 Dec 2023 18:24:48 -0800 Subject: [PATCH] fix: encode artist names --- src/_data/weeklyArtistChart.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_data/weeklyArtistChart.js b/src/_data/weeklyArtistChart.js index b3a45348..0c28ba9f 100644 --- a/src/_data/weeklyArtistChart.js +++ b/src/_data/weeklyArtistChart.js @@ -7,7 +7,7 @@ module.exports = async function () { const date = parseInt(chart['weeklyartistchart']['@attr']['to']) * 1000 let content = 'My top artists for the week: ' artists.forEach((artist, index) => { - content += `${artist['name']} @ ${artist['playcount']} play${ + content += `${encodeURIComponent(artist['name'])} @ ${artist['playcount']} play${ parseInt(artist['playcount']) > 1 ? 's' : '' }` if (index !== artists.length - 1) content += ', '