allow CDATA content to go to RSS description
This allows feed entry `content` specified with `type="CDATA"` to be translated to RSS description with CDATA specified
This commit is contained in:
parent
9da6b17ca2
commit
cfaeb68898
1 changed files with 3 additions and 1 deletions
|
@ -206,7 +206,9 @@ class FeedEntry(object):
|
||||||
description.text = self.__rss_description
|
description.text = self.__rss_description
|
||||||
elif self.__rss_content:
|
elif self.__rss_content:
|
||||||
description = etree.SubElement(entry, 'description')
|
description = etree.SubElement(entry, 'description')
|
||||||
description.text = self.__rss_content['content']
|
description.text = etree.CDATA(self.__rss_content['content']) \
|
||||||
|
if self.__rss_content.get('type', '') == 'CDATA' \
|
||||||
|
else self.__rss_content['content']
|
||||||
for a in self.__rss_author or []:
|
for a in self.__rss_author or []:
|
||||||
author = etree.SubElement(entry, 'author')
|
author = etree.SubElement(entry, 'author')
|
||||||
author.text = a
|
author.text = a
|
||||||
|
|
Loading…
Reference in a new issue