Skip to content

Commit

Permalink
Add CDATA tags to RSS
Browse files Browse the repository at this point in the history
  • Loading branch information
leftouterjoins committed Nov 13, 2023
1 parent 81f2ed9 commit b2b78ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/rss.xml.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:podcast="https://podcastindex.org/namespace/1.0">
<channel>
<title><?= $feed['name'] ?></title>
<description><?= htmlentities(strip_tags(strval($feed['description'])), ENT_QUOTES | ENT_SUBSTITUTE | ENT_XML1, '', false) ?></description>
<description><?= $feed['description'] ?></description>
<itunes:image href="<?= $host ?>/image?feed_id=<?= $feed['id'] ?>" />
<language>en-us</language>
<generator>podsumer</generator>
Expand All @@ -13,7 +13,7 @@
<? foreach($items as $item): ?>
<item>
<title><?= $item['name'] ?></title>
<description><?= htmlentities(strip_tags(strval($item['description'])), ENT_QUOTES | ENT_SUBSTITUTE | ENT_XML1, '', false) ?></description>
<description><![CDATA[ <?= $item['description'] ?> ]]></description>
<pubDate><?= $item['published'] ?></pubDate>
<enclosure url="<?= $host ?>/media?item_id=<?= $item['id'] ?>" type="audio/mp3" length="<?= $item['size'] ?>"/>
<link><?= $host ?>/item?item_id=<?= $item['id'] ?></link>
Expand Down

0 comments on commit b2b78ef

Please sign in to comment.