Closed hakdag closed 6 months ago
I have a sample JSON similar to this:
{ "id": "1", "name": "test", "fields": { "description": "<p>description</p>" } }
And template:
| {{#each fields}} {{@key}} | {{/each}} | {{#each fields}} - | {{/each}} | {{#each fields}} {{this}} | {{/each}}
in the template, last line produces description in a table. {{this}} is not escaped. Result is:
description
What should I do?
You could try {{{this}}} using three brackets instead of only 2. I'm not sure what you're expecting in your result, since you only show the value of the "description" field.
{{{this}}}
I have a sample JSON similar to this:
{ "id": "1", "name": "test", "fields": { "description": "<p>description</p>" } }
And template:
{{name}} ({{id}})
Fields
| {{#each fields}} {{@key}} | {{/each}} | {{#each fields}} - | {{/each}} | {{#each fields}} {{this}} | {{/each}}
in the template, last line produces description in a table. {{this}} is not escaped. Result is:
description
What should I do?