fix: fix encoding of xml
This commit is contained in:
parent
933154a5a1
commit
bba27c40cf
2 changed files with 4 additions and 4 deletions
|
@ -239,6 +239,6 @@ class GenRSS:
|
|||
"""
|
||||
root = self.to_element()
|
||||
|
||||
return '<?xml version="1.0" encoding="UTF-8"?>\n' \
|
||||
+ ('\n' if pretty else '') \
|
||||
+ tostring(root, pretty_print=pretty).decode('utf-8')
|
||||
return tostring(root, pretty_print=pretty, xml_declaration=True,
|
||||
encoding='UTF-8').\
|
||||
decode('utf-8')
|
||||
|
|
|
@ -40,7 +40,7 @@ def test_feed_description(description, expose):
|
|||
|
||||
|
||||
@pytest.mark.parametrize('copyright, expose', [
|
||||
pytest.param('copyright © genrss', 'copyright © genrss', id='copy'),
|
||||
pytest.param('copyright © genrss', 'copyright © genrss', id='copy'),
|
||||
])
|
||||
def test_feed_copyright(copyright, expose):
|
||||
feed = create_rss(copyright=copyright)
|
||||
|
|
Loading…
Reference in a new issue