• Hi all, I’m using PowerPress for my podcast site, but I’ve done some customization. Notably, I’m using a custom player for each post, which I embed via a shortcode, and I just don’t include the default PowerPress player.

    This works fine, but unfortunately, the code for the player makes its way into the PowerPress feed, and it shows in some podcast players. I know I can customize the <itunes:summary> tag, but the code is appearing in the <content:encoded> field, which fills from the post content.

    Here’s an example item in my feed showing the current problem. I’ve taken out detailed shownotes for brevity’s sake:

    <item>
    		<title>1.08 The Potions Master</title>
    		<link>https://podtrificustotalus.com/1-08-potions-master/</link>
    		<pubDate>Tue, 22 Aug 2017 04:46:00 +0000</pubDate>
    		<guid isPermaLink="false">https://podtrificustotalus.com/?p=207</guid>
    		<comments>https://podtrificustotalus.com/1-08-potions-master/#comments</comments>
    		<wfw:commentRss>https://podtrificustotalus.com/1-08-potions-master/feed/</wfw:commentRss>
    		<slash:comments>1</slash:comments>
    		<category><![CDATA[Philosopher's Stone]]></category>
    		<category><![CDATA[episodes]]></category>
    		<description><p>Snape shows up and Harry is all &quot;why are you so obsessed with me?&quot;</p>
    <p>The post <a rel=&quot;nofollow&quot; href=&quot;https://podtrificustotalus.com/1-08-potions-master/&quot;>1.08 The Potions Master</a> appeared first on <a rel=&quot;nofollow&quot; href=&quot;https://podtrificustotalus.com&quot;>Podtrificus Totalus</a>.</p></description>
    		<content:encoded><![CDATA[
    		<script>
    			window. potions = {
    				"options": {
    					"theme": "podtrificus"
    				},
    				"extensions": {
    					"SubscribeBar": {disabled:true},
    					"Transcript": {}
    				},
    				"podcast": {
    					"title": "Podtrificus Totalus",
    					"feed": "https://podtrificustotalus.com/feed/podcast/",
    				},
    				"episode": {
    					"media": {
    						"mp3": "https://podtrificustotalus.nyc3.cdn.digitaloceanspaces.com/108ThePotionsMaster.mp3"
    					},
    					"coverUrl": "https://podtrificustotalus.com/wp-content/uploads/2019/04/Podtrificus-Totalus.jpg",
    					"title": "1.08 The Potions Master",
    					"url": "https://podtrificustotalus.com/1-08-potions-master/",
    					"transcript": ""
    				}
    			}
    		</script>
    		<script class="podigee-podcast-player" src="https://podtrificustotalus.com/wp-content/plugins/podigee-podcast-player/javascripts/podigee-podcast-player.js" data-configuration="potions"></script>
    </content:encoded>
    		<enclosure url="https://media.blubrry.com/podtrificustotalus/podtrificustotalus.nyc3.cdn.digitaloceanspaces.com/108ThePotionsMaster.mp3" length="22708276" type="audio/mpeg" />
    		<itunes:subtitle>Snape shows up and Harry is all &quot;why are you so obsessed with me?&quot;</itunes:subtitle>
    		<itunes:summary>Custom iTunes summary</itunes:summary>
    		<itunes:author>Podtrificus Totalus</itunes:author>
    		<itunes:season>1</itunes:season>
    		<itunes:episode>8</itunes:episode>
    		<itunes:title>The Potions Master</itunes:title>
    		<itunes:explicit>clean</itunes:explicit>
    		<itunes:duration>27:45</itunes:duration>
    		</item>

    Is there a way for me to strip out the <script> tags from the feed? I found a semi-related post on StackOverflow, but I wasn’t able to adapt it for PowerPress: https://wordpress.stackexchange.com/questions/238383/how-can-i-remove-image-from-feed

    Thanks for any help, and please let me know if I can provide any further information.

    The page I need help with: [log in to see the link]

  • The topic ‘Strip html code from RSS feed’ is closed to new replies.