Skip to content

Commit eed645c

Browse files
authored
encode XML as bytes in render_footnotes()
`part._blob` should have the class `bytes`.
1 parent 60caff8 commit eed645c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)