Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion feedgen/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def _add_text_elm(entry, data, name):
)
# Add type description of the content
if type_:
elm.attrib['type'] = type_
elm.attrib['type'] = 'html' if type_ == 'CDATA' else type_


class FeedEntry(object):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def test_content_cdata_type(self):
fe.title('some title')
fe.content('content', type='CDATA')
result = fg.atom_str()
assert b'<content type="CDATA"><![CDATA[content]]></content>' in result
assert b'<content type="html"><![CDATA[content]]></content>' in result

def test_summary_html_type(self):
fg = FeedGenerator()
Expand Down