HtmlentitiesViewHelper extends AbstractEncodingViewHelper

FinalYes

ViewHelper to apply `htmlentities()` escaping to a value, transforming all HTML special characters to entity representations (like `"` to `"`).

  <f:format.htmlentities>{textWithHtml}</f:format.htmlentities>
Tags
see
https://www.php.net/manual/function.htmlentities.php
see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-format-htmlentities

Table of Contents

Properties

$defaultEncoding  : string
$escapeChildren  : bool
This prevents double encoding as the whole output gets encoded at the end
$escapeOutput  : bool
Output gets encoded by this viewhelper

Methods

getContentArgumentName()  : string
Explicitly set argument name to be used as content.
initializeArguments()  : void
render()  : mixed
Escapes special characters with their escaped counterparts as needed using PHPs htmlentities() 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

This prevents double encoding as the whole output gets encoded at the end

protected bool $escapeChildren = false

$escapeOutput

Output gets encoded by this viewhelper

protected bool $escapeOutput = false

Methods

getContentArgumentName()

Explicitly set argument name to be used as content.

public getContentArgumentName() : string
Return values
string

initializeArguments()

public initializeArguments() : void

resolveDefaultEncoding()

Resolve the default encoding. If none is set in Frontend or Backend, uses UTF-8.

protected static resolveDefaultEncoding() : string
Return values
string

        
On this page

Search results