Autoescape should be TRUE by default
HongYang01 opened this issue · 0 comments
HongYang01 commented
I suggest this because I was new to python-docx and generating reports that contained < > &
characters. At first, I was miserable; the report was generated successfully but was corrupted when opened in MS Word.
So, I hope the team could make the "Autoescape" to True by default.
Refer Doc: https://docxtpl.readthedocs.io/en/latest/#escaping-1
Block of source code here:
# docxtpl\template.py
{...}
def render(
self,
context: Dict[str, Any],
jinja_env: Optional[Environment] = None,
autoescape: bool = False
) -> None:
{...}