X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/4e329824f40367945de11d3647396859092f5c2c..a2b90373ee7aa46769fb6faad75bac1ebef3758f:/librarian/html.py?ds=sidebyside
diff --git a/librarian/html.py b/librarian/html.py
index 67f0061..ed7b4d6 100644
--- a/librarian/html.py
+++ b/librarian/html.py
@@ -38,10 +38,10 @@ def html_has_content(text):
def transform_abstrakt(abstrakt_element):
style_filename = get_stylesheet('legacy')
style = etree.parse(style_filename)
- xml = etree.tostring(abstrakt_element)
- document = etree.parse(six.BytesIO(xml.replace('abstrakt', 'dlugi_cytat'))) # HACK
+ xml = etree.tostring(abstrakt_element, encoding='unicode')
+ document = etree.parse(six.StringIO(xml.replace('abstrakt', 'dlugi_cytat'))) # HACK
result = document.xslt(style)
- html = re.sub('', '', etree.tostring(result))
+ html = re.sub('', '', etree.tostring(result, encoding='unicode'))
return re.sub('?blockquote[^>]*>', '', html)