PHP Class Prado\Web\UI\WebControls\TSafeHtml
TSafeHtml is a control that strips down all potentially dangerous HTML content.
It is mainly a wrapper of {@link http://htmlpurifier.org/ HTMLPurifier} project.
To use TSafeHtml, simply enclose the content to be secured within
the body of TSafeHtml in a template.
You can specify a custom configuration for HTMLPurifier using the
{@link setConfig Config} property. Please refer to the
{@link http://htmlpurifier.org/docs HTMLPurifier documentation} for the
possibile configuration parameters.
Exibir arquivo
Open project: pradosoft/prado
Public Methods
Method |
Description |
|
getConfig ( ) : HTMLPurifier_Config |
|
|
render ( $writer ) |
Renders body content. |
|
setConfig ( HTMLPurifier_Config $value ) |
Sets a custom configuration for HTMLPurifier. |
|
Protected Methods
Method |
Description |
|
parseSafeHtml ( $text ) : string |
Use HTMLPurifier to remove malicous content from HTML. |
|
Method Details
getConfig()
public method
public getConfig ( ) : HTMLPurifier_Config |
return |
HTMLPurifier_Config |
Configuration for HTMLPurifier. |
parseSafeHtml()
protected method
Use HTMLPurifier to remove malicous content from HTML.
This method overrides parent implementation by removing malicious code from the body content
setConfig()
public method
Sets a custom configuration for HTMLPurifier.
public setConfig ( HTMLPurifier_Config $value ) |
$value |
HTMLPurifier_Config |
|