fix: fix encoding of xml
This commit is contained in:
parent
933154a5a1
commit
c19b9f0cf2
3 changed files with 5 additions and 5 deletions
|
@ -239,6 +239,6 @@ class GenRSS:
|
||||||
"""
|
"""
|
||||||
root = self.to_element()
|
root = self.to_element()
|
||||||
|
|
||||||
return '<?xml version="1.0" encoding="UTF-8"?>\n' \
|
return tostring(root, pretty_print=pretty, xml_declaration=True,
|
||||||
+ ('\n' if pretty else '') \
|
encoding='UTF-8').\
|
||||||
+ tostring(root, pretty_print=pretty).decode('utf-8')
|
decode('utf-8')
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -8,7 +8,7 @@ with open('README.md', 'r') as f:
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
setup(
|
setup(
|
||||||
name='genrss',
|
name='genrss',
|
||||||
version='1.0.2',
|
version='1.0.3',
|
||||||
author='Dmitriy Pleshevskiy',
|
author='Dmitriy Pleshevskiy',
|
||||||
author_email='dmitriy@ideascup.me',
|
author_email='dmitriy@ideascup.me',
|
||||||
description='RSS feed generator for python',
|
description='RSS feed generator for python',
|
||||||
|
|
|
@ -40,7 +40,7 @@ def test_feed_description(description, expose):
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('copyright, 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):
|
def test_feed_copyright(copyright, expose):
|
||||||
feed = create_rss(copyright=copyright)
|
feed = create_rss(copyright=copyright)
|
||||||
|
|
Loading…
Reference in a new issue