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

FR: Support templates for JSON renderer #84

Closed
noerw opened this issue Jan 21, 2021 · 2 comments
Closed

FR: Support templates for JSON renderer #84

noerw opened this issue Jan 21, 2021 · 2 comments

Comments

@noerw
Copy link

noerw commented Jan 21, 2021

Currently, only HTML supports template rendering.
We want to render JSON from a template, but using HTML() causes issues because of HTML escaping.

@unrolled
Copy link
Owner

How do you see this working? Would using the same HTML template but not escape the output (and change the header)?

@noerw
Copy link
Author

noerw commented Jan 22, 2021

The simple way would be to add a flag to HTML() that disables html escaping.
Imo better would be to provide a generic Template() method, that accepts escaping options and is used internally by HTML()

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

No branches or pull requests

2 participants