PHP Класс 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.
Показать файл
Открыть проект
Открытые методы
Метод |
Описание |
|
getConfig ( ) : HTMLPurifier_Config |
|
|
render ( $writer ) |
Renders body content. |
|
setConfig ( HTMLPurifier_Config $value ) |
Sets a custom configuration for HTMLPurifier. |
|
Защищенные методы
Метод |
Описание |
|
parseSafeHtml ( $text ) : string |
Use HTMLPurifier to remove malicous content from HTML. |
|
Описание методов
getConfig()
публичный Метод
public getConfig ( ) : HTMLPurifier_Config |
Результат |
HTMLPurifier_Config |
Configuration for HTMLPurifier. |
parseSafeHtml()
защищенный Метод
Use HTMLPurifier to remove malicous content from HTML.
This method overrides parent implementation by removing malicious code from the body content
setConfig()
публичный Метод
Sets a custom configuration for HTMLPurifier.
public setConfig ( HTMLPurifier_Config $value ) |
$value |
HTMLPurifier_Config |
|