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

Add HTML autoescape #292

Merged
merged 5 commits into from
Oct 5, 2024
Merged

Add HTML autoescape #292

merged 5 commits into from
Oct 5, 2024

Conversation

berthubert
Copy link
Contributor

Since (j)inja templates are often used for creating HTML, it might be useful for inja to have a feature that does this. It is pretty inconvenient to manually have to escape all JSON strings. This PR adds a one stop set_html_autoescape feature that will HTML escape all strings for you. This is only available through an Environment.

@pantor pantor merged commit 807620c into pantor:main Oct 5, 2024
14 of 15 checks passed
@pantor
Copy link
Owner

pantor commented Oct 5, 2024

Great, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants