So, based on the documentation handler
is an XMLGenerator
, and calling addQuickElement
has the assumption that all of the content is character data. Hence why its being escaped.
What you are probably going to have to do is override SyndicationFeed.add_item_elements(self, handler, item)
and insert the a
elements using addQuickElement
, and add the itunes:summary
tags using startElement
and endElement
.
class iTunesFeed(Rss201rev2Feed): def add_item_elements(self, handler item): super(iTunesFeed, self).add_root_elements(handler) handler.startElement('itunes:summary') handler.characters('Link to ') handler.addQuickElement('a', 'the website', {'href':'http://www.website.com'}) handler.endElement('itunes:summary')
This might not be 100% functional, but should get you pretty close.