unrolled/render

FR: Support templates for JSON renderer

noerw opened this issue · 2 comments

noerw commented

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)?

noerw commented

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()