Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Template::Toolkit content for Perlanet RSS aggregator. Uses HTML::Scrubber plugin for TT to defang and normalise the typography of the feeds that it aggregates.
<div class="span-17 colborder" id="content" >
[% USE Filter.HTMLScrubber %]
[% FOREACH entry IN feed.entries %]
<h2 class="loud alt"><a href="[% entry.link | url | html %]">[% entry.title | html %]</h2></a>
<div class="alt">
[% entry.content.body
| html_scrubber(['-span','+p','+h3','+h4','+ol','+ul','+li','+strong','+em','-style','-script', '-iframe'])
| remove('style=".*?"' )
| remove('class=".*?"' )
| replace( '<img\s', '<img class="right" width="50%" ' )
| replace( '<p', '<p class="alt"' )
| remove('<img\sclass="right"\swidth="50%"\ssrc="http:\/\/podcastpickle.com\/\.assets.*?>' )
| remove('<img\sclass="right"\swidth="50%"\ssrc="http:\/\/assets.*?>' )
| remove('<img\sclass="right"\swidth="50%"\ssrc="http:\/\/feeds.feedburner.com.*?>' )
| remove('<img\sclass="right"\swidth="50%"\ssrc="http:\/\/www\.podcastalley\.com\/images\/podcastalley_icon.*?>' )
%]
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.