TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
HtmlentitiesViewHelper Class Reference
Inheritance diagram for HtmlentitiesViewHelper:
AbstractEncodingViewHelper SingletonInterface AbstractViewHelper

Public Member Functions

 render ($value=null, $keepQuotes=false, $encoding=null, $doubleEncode=true)
 

Protected Attributes

 $escapingInterceptorEnabled = false
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractViewHelper
static renderStatic (array $arguments,\Closure $renderChildrenClosure,\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext)
 
- Protected Member Functions inherited from AbstractViewHelper
 registerArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 overrideArgument ($name, $type, $description, $required=false, $defaultValue=null)
 
 callRenderMethod ()
 
 getLogger ()
 
 buildRenderChildrenClosure ()
 
 hasArgument ($argumentName)
 
- Static Protected Member Functions inherited from AbstractEncodingViewHelper
static resolveDefaultEncoding ()
 
- Static Protected Attributes inherited from AbstractEncodingViewHelper
static $defaultEncoding = null
 

Detailed Description

Applies htmlentities() escaping to a value

See Also
http://www.php.net/manual/function.htmlentities.php

= Examples =

<f:format.htmlentities>{text}</f:format.htmlentities> <output> Text with & " ' < > * replaced by HTML entities (htmlentities applied). </output>

{text -> f:format.htmlentities(encoding: 'ISO-8859-1')} <output> Text with & " ' < > * replaced by HTML entities (htmlentities applied). </output>

Definition at line 37 of file HtmlentitiesViewHelper.php.

Member Function Documentation

render (   $value = null,
  $keepQuotes = false,
  $encoding = null,
  $doubleEncode = true 
)

Escapes special characters with their escaped counterparts as needed using PHPs htmlentities() function.

Parameters
string$valuestring to format
bool$keepQuotesif TRUE, single and double quotes won't be replaced (sets ENT_NOQUOTES flag)
string$encoding
bool$doubleEncodeIf FALSE existing html entities won't be encoded, the default is to convert everything.
Returns
string the altered string
See Also
http://www.php.net/manual/function.htmlentities.php

Definition at line 58 of file HtmlentitiesViewHelper.php.

References AbstractViewHelper\renderChildren().

Member Data Documentation

$escapingInterceptorEnabled = false
protected

Definition at line 45 of file HtmlentitiesViewHelper.php.