interface AttributeSanitizerInterface

Implements attribute-specific sanitization logic.

Methods

array|null
getSupportedElements()

Returns the list of element names supported, or null to support all elements.

array|null
getSupportedAttributes()

Returns the list of attributes names supported, or null to support all attributes.

string|null
sanitizeAttribute(string$element,string$attribute,string$value,HtmlSanitizerConfig$config)

Returns the sanitized value of a given attribute for the given element.

Details

array|null getSupportedElements()

Returns the list of element names supported, or null to support all elements.

Return Value

array|null

array|null getSupportedAttributes()

Returns the list of attributes names supported, or null to support all attributes.

Return Value

array|null

string|null sanitizeAttribute(string$element,string$attribute,string$value,HtmlSanitizerConfig$config)

Returns the sanitized value of a given attribute for the given element.

Parameters

string $element
string $attribute
string $value
HtmlSanitizerConfig $config

Return Value

string|null