not able to favorite a podcast?
seasalts opened this issue · 4 comments
seasalts commented
MrChuckomo commented
Thanks for the feedback.
Unfortunately I couldn't find a quick solution. It seems the default feed is broken. This could affect other Podcasts as well. Thanks for pointing to this one.
I'll investigate it further.
josephsamela commented
That pesky single '
mark is un-escaped. Manually escaping this character \'
from the debugger fixes this. Look at the podcast title argument of setFavorite()
below:
<svg onclick="setFavorite(this, 'Night Vale Presents', 'Alice Isn't Dead', 'https://is1-ssl.mzstatic.com/image/thumb/Music128/v4/bc/57/2b/bc572b01-8563-ccce-9e9c-221c53f44526/source/30x30bb.jpg', 'https://is1-ssl.mzstatic.com/image/thumb/Music128/v4/bc/57/2b/bc572b01-8563-ccce-9e9c-221c53f44526/source/60x60bb.jpg', 'https://is1-ssl.mzstatic.com/image/thumb/Music128/v4/bc/57/2b/bc572b01-8563-ccce-9e9c-221c53f44526/source/100x100bb.jpg', 'http://feeds.nightvalepresents.com/aliceisntdeadpodcast')" fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none"></path>
<path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"></path>
</svg>
Un-escaped characters in any of these arguments would presumably break this feature, not just podcast title. Perhaps escape these arguments white building the icon (line 86 of itunes.js
)? Something like this:
PodcastInfos.artistName.replace(/([\"\'])/g,'\\')
MrChuckomo commented
Thanks for the PR and pointing this out.
MrChuckomo commented