elapouya / python-docx-template

Use a docx as a jinja2 template
GNU Lesser General Public License v2.1
1.98k stars 385 forks source link

Unable to open doc file after render XML code #461

Closed phucdc closed 1 year ago

phucdc commented 1 year ago

Im trying to render XML inside my document, everything works fine, but when i tried to open Document, it show as bellow:

image

Maybe Word detected that XML and think it's Document's XML, then we have this error Sorry for bad English

elapouya commented 1 year ago

Please use autoescape=True in render()

Cordialement,

Eric Lapouyade

------- Original Message ------- Le vendredi 28 octobre 2022 à 09:27, PhucBonTu @.***> a écrit :

Im trying to render XML inside my document, everything works fine, but when i tried to open Document, it show as bellow:

image

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

phucdc commented 1 year ago

Thanks, that fixed.