Format.cdata ViewHelper <f:format.cdata>

Outputs an argument/value without any escaping and wraps it with CDATA tags.

PAY SPECIAL ATTENTION TO SECURITY HERE (especially Cross Site Scripting), as the output is NOT SANITIZED!

Examples

Child nodes

<f:format.cdata>{string}</f:format.cdata>
Copied!

Output:

<![CDATA[(Content of {string} without any conversion/escaping)]]>
Copied!

Value attribute

<f:format.cdata value="{string}" />
Copied!

Output:

<![CDATA[(Content of {string} without any conversion/escaping)]]>
Copied!

Inline notation

{string -> f:format.cdata()}
Copied!

Output:

<![CDATA[(Content of {string} without any conversion/escaping)]]>
Copied!

Source code

Go to the source code of this ViewHelper: CdataViewHelper.php (GitHub).

Arguments

The following arguments are available for <f:format.cdata>:

Name display Type Default
mixed
value
Type
mixed

The value to output