render
render copied to clipboard
FR: Support templates for JSON renderer
Currently, only HTML supports template rendering.
We want to render JSON from a template, but using HTML() causes issues because of HTML escaping.
How do you see this working? Would using the same HTML template but not escape the output (and change the header)?
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()