HtmlentitiesDecodeViewHelper extends AbstractEncodingViewHelper
Applies :php:`html_entity_decode()` to a value.
See https://www.php.net/html_entity_decode.
Examples
Default notation
::
<f:format.htmlentitiesDecode>{text}</f:format.htmlentitiesDecode>
Text containing the following escaped signs: &
"
'
<
>
, will be processed by :php:html_entity_decode()
.
These will result in: &
"
'
<
>
.
Inline notation
::
{text -> f:format.htmlentitiesDecode(encoding: 'ISO-8859-1')}
Text containing the following escaped signs: &
"
'
<
>
, will be processed by :php:html_entity_decode()
.
These will result in: &
"
'
<
>
.
But encoded as ISO-8859-1.
Table of Contents
Properties
- $defaultEncoding : string
- $escapeChildren : bool
- We accept value and children interchangeably, thus we must disable children escaping.
- $escapeOutput : bool
- If we decode, we must not encode again after that.
Methods
- getContentArgumentName() : string
- Explicitly set argument name to be used as content.
- initializeArguments() : void
- render() : mixed
- Converts all HTML entities to their applicable characters as needed using PHPs html_entity_decode() function.
- resolveDefaultEncoding() : string
- Resolve the default encoding. If none is set in Frontend or Backend, uses UTF-8.
Properties
$defaultEncoding
protected
static string
$defaultEncoding
$escapeChildren
We accept value and children interchangeably, thus we must disable children escaping.
protected
bool
$escapeChildren
= false
$escapeOutput
If we decode, we must not encode again after that.
protected
bool
$escapeOutput
= false
Methods
getContentArgumentName()
Explicitly set argument name to be used as content.
public
getContentArgumentName() : string
Return values
stringinitializeArguments()
public
initializeArguments() : void
render()
Converts all HTML entities to their applicable characters as needed using PHPs html_entity_decode() function.
public
render() : mixed
Tags
resolveDefaultEncoding()
Resolve the default encoding. If none is set in Frontend or Backend, uses UTF-8.
protected
static resolveDefaultEncoding() : string