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.
부터: 3.0
상속: extends Prado\Web\UI\TControl
파일 보기 프로젝트 열기: pradosoft/prado

공개 메소드들

메소드 설명
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.
protected parseSafeHtml ( $text ) : string
리턴 string safer HTML content

render() 공개 메소드

This method overrides parent implementation by removing malicious code from the body content
public render ( $writer )

setConfig() 공개 메소드

Sets a custom configuration for HTMLPurifier.
public setConfig ( HTMLPurifier_Config $value )
$value HTMLPurifier_Config