Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoescape should be TRUE by default #557

Open
HongYang01 opened this issue Aug 5, 2024 · 0 comments
Open

Autoescape should be TRUE by default #557

HongYang01 opened this issue Aug 5, 2024 · 0 comments

Comments

@HongYang01
Copy link

HongYang01 commented Aug 5, 2024

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:
{...}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant