From a4df253608e0806774c9363f7fc81738829b71b1 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Thu, 7 Dec 2023 18:39:14 -0800 Subject: [PATCH] fix: xml naming --- src/_data/weeklyArtistChart.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/_data/weeklyArtistChart.js b/src/_data/weeklyArtistChart.js index 0c28ba9f..db634884 100644 --- a/src/_data/weeklyArtistChart.js +++ b/src/_data/weeklyArtistChart.js @@ -7,7 +7,8 @@ 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 += `${encodeURIComponent(artist['name'])} @ ${artist['playcount']} play${ + const artistName = artist['name'].replace('&', '&'); + content += `${artistName} @ ${artist['playcount']} play${ parseInt(artist['playcount']) > 1 ? 's' : '' }` if (index !== artists.length - 1) content += ', '