fix: escape ]]> in podcast description

This commit is contained in:
2025-06-04 13:41:02 +09:00
parent 1e97a0847e
commit 2c1ae6b867

View File

@ -27,12 +27,12 @@ export async function updatePodcastRSS() {
itemsXml += ` itemsXml += `
<item> <item>
<title><![CDATA[${ep.title}]]></title> <title><![CDATA[${ep.title}]]></title>
<description><![CDATA[${ep.title.replace(/\]\]>/g, ']]&gt;')}]]></description> <description><![CDATA[${ep.title.replace(/\]\]>/g, "]]&gt;")}]]></description>
<author>${channelAuthor}</author> <author>${channelAuthor}</author>
<category>${channelCategories}</category> <category>${channelCategories}</category>
<language>${channelLanguage}</language> <language>${channelLanguage}</language>
<ttl>${channelTTL}</ttl> <ttl>${channelTTL}</ttl>
<enclosure url="${fileUrl}" length="${fileSize}" type="audio/mpeg" /> <enclosure url="${fileUrl}" length="${fileSize}" type="audio/wav" />
<guid>${fileUrl}</guid> <guid>${fileUrl}</guid>
<pubDate>${pubDate}</pubDate> <pubDate>${pubDate}</pubDate>
</item> </item>