Skip to content

HtmlPurifier ​

Type
Class
Namespace
craft\helpers
Inherits
craft\helpers\HtmlPurifier » yii\helpers\HtmlPurifier » yii\helpers\BaseHtmlPurifier
Since
3.0.0

HtmlPurifier provides an ability to clean up HTML from any harmful code.

View source

Public Methods ​

MethodDescription
cleanUtf8()
configure()Allow the extended HtmlPurifier class to set some default config options.
convertToUtf8()
process()Passes markup through HTMLPurifier making it safe to output to end user.

cleanUtf8() ​

View source

Arguments ​

Returns ​

string

configure() ​

Allow the extended HtmlPurifier class to set some default config options.

View source

Arguments ​

  • $config (\HTMLPurifier_Config)

convertToUtf8() ​

View source

Arguments ​

  • $string (string)
  • $config (\HTMLPurifier_Config)

Returns ​

string