Quantcast
Channel: Insert un-escaped html into rss feed made in django - Stack Overflow
Browsing all 7 articles
Browse latest View live

Answer by Jolaiya Emmanuel for Insert un-escaped html into rss feed made in...

What works for me was improving @RNC answer using the code below:from django.utils.feedgenerator import Rss201rev2Feedfrom django.utils.xmlutils import SimplerXMLGeneratorfrom...

View Article


Answer by RNC for Insert un-escaped html into rss feed made in django

This is still the number one hit on google for this issue, so here's the fully fleshed out answer based on Nick's reply here:from xml.sax.saxutils import XMLGeneratorclass...

View Article


Answer by Darío López Padial for Insert un-escaped html into rss feed made in...

You can replace the code: contents = '<![CDATA[ contents ]]' xml.addQuickElement('element', contents=contents)with: contents = 'contents' xml.startElement('element', {}) xml._write(f'<![CDATA[...

View Article

Answer by T. Lacy for Insert un-escaped html into rss feed made in django

Here is how I was able to get CDATA tags into my output without them being escaped. I created the AppleGenerator that inherits from SimplerXMLGenerator that Rss20rev2Feed uses by default. I then went...

View Article

Answer by ascripter for Insert un-escaped html into rss feed made in django

I was facing the same problem in Django 1.10 and traced it back to the point where all the escaping occurs. django.utils.RssFeed.write() writes items using django.utils.xmlutils.SimplerXMLGeneratoras a...

View Article


Answer by user764357 for Insert un-escaped html into rss feed made in django

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...

View Article

Insert un-escaped html into rss feed made in django

I'm trying to use django to create a podcast rss feed using feedgenerator.Rss201rev2FeedAs a feed generator, it works somewhat the opposite to BeautifulSoup: putting info into appropriate xml tagsIt's...

View Article
Browsing all 7 articles
Browse latest View live