Actions
Bug #91742
closedFluid view helper asset.script escape children
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2020-07-03
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:
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."
Actions