From eb5c2859524e30aa75c4d43ad68c1c5e8cdc44fc Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Sun, 29 Sep 2013 19:48:33 +0200 Subject: [PATCH] Fixed bug with non-existing type attributes --- feedgen/entry.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feedgen/entry.py b/feedgen/entry.py index 68f7fa2..699f885 100644 --- a/feedgen/entry.py +++ b/feedgen/entry.py @@ -105,12 +105,12 @@ class FeedEntry(object): content.append(etree.fromstring('''
%s
''' % \ self.__atom_content.get('content'))) - # Parse XML and embed it - elif type.endswith('/xml') or type.endswith('+xml'): - content.append(etree.fromstring(self.__atom_content['content'])) # Emed the text in escaped form elif not type or type.startswith('text') or type == 'html': content.text = self.__atom_content.get('content') + # Parse XML and embed it + elif type.endswith('/xml') or type.endswith('+xml'): + content.append(etree.fromstring(self.__atom_content['content'])) # Everything else should be included base64 encoded else: raise ValueError('base64 encoded content is not supported at the moment.'