render icon indicating copy to clipboard operation
render copied to clipboard

FR: Support templates for JSON renderer

Open noerw opened this issue 5 years ago • 2 comments

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

noerw avatar Jan 21 '21 15:01 noerw

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

unrolled avatar Jan 22 '21 15:01 unrolled

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

noerw avatar Jan 22 '21 15:01 noerw