#91742Fluid view helper asset.script escape children
Description
A variable (e.g. data.bodytext) holds json data. When using it in a fluid asset script view helper the resulting json code is escaped:
<f:asset.script identifier="pp-schema-{data.uid}" type="application/ld+json">
{data.bodytext}
</f:asset.script>
Escaped result:
<script type="application/ld+json">
{
"@context":"http://schema.org",
"@type":"Hotel",
The view helper script has escapeOutput disabled.
When creating a descendent view helper and setting escapeChildren to false the resulting code won’t be escaped any more hence the output is as expected. According to the description it shouldn’t be needed to disable escapeChildren:
“If escaping of children is disabled, no nodes that are passed with inline syntax or values used as tag content will be escaped. Note that $escapeOutput takes priority: if it is disabled, escaping of child nodes is also disabled unless explicitly enabled.”
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.