HtmlPurifier

Type
Class
Namespace
craft\helpers
Inherits
craft\helpers\HtmlPurifier » yii\helpers\HtmlPurifier » yii\helpers\BaseHtmlPurifier
Since
3.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

Signature

public static string cleanUtf8 ( \craft\helpers\string $string )

configure()

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

View source

Arguments

  • $config (\HTMLPurifier_Config)

Signature

public static void configure ( $config )

convertToUtf8()

View source

Arguments

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

Returns

string

Signature

public static string convertToUtf8 ( \craft\helpers\string $string, \HTMLPurifier_Config $config )