Skip to content

Commit def1205

Browse files
authored
Merge pull request #575 from jhpyle/patch-1
encode XML as bytes in render_footnotes()
2 parents 60caff8 + eed645c commit def1205

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docxtpl/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ def render_footnotes(
370370
else part.blob
371371
)
372372
xml = self.render_xml_part(xml, part, context, jinja_env)
373-
part._blob = xml
373+
part._blob = xml.encode("utf-8")
374374

375375
def resolve_listing(self, xml):
376376

0 commit comments

Comments
 (0)