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 += ', '