SanitizerOptions
class SanitizerOptions (View source)
Properties
static protected string | $defaultUnsafeElements | The default space-separated list of unsafe XML elements. |
|
static protected string | $defaultUnsafeAttributes | The default space-separated list of unsafe XML attributes. |
|
static protected string | $defaultElementWhiteList | The default space-separated list of XML elements to not consider as unsafe. |
|
static protected string | $defaultAttributeWhiteList | The default space-separated list of XML attributes to not consider as unsafe. |
|
private string[] | $unsafeElements | The list of unsafe XML elements. |
|
private string[] | $unsafeAttributes | The list of unsafe XML attributes. |
|
private string[] | $elementWhitelist | The list of XML elements to not consider as unsafe. |
|
private string[] | $attributeWhitelist | The list of XML attributes to not consider as unsafe. |
Methods
Initialize the instance.
Get the list of unsafe XML elements.
Set the list of unsafe XML elements.
Get the list of unsafe XML attributes.
Set the list of unsafe XML attributes.
Get the list of XML elements to not consider as unsafe.
Set the list of XML elements to not consider as unsafe.
Get the list of XML attributes to not consider as unsafe.
Set the list of XML attributes to not consider as unsafe.
Takes an array, keeps only strings, makes them lowercase, and returns the unique values.
Details
__construct()
Initialize the instance.
string[]
getUnsafeElements()
Get the list of unsafe XML elements.
$this
setUnsafeElements(string|string[] $value)
Set the list of unsafe XML elements.
string[]
getUnsafeAttributes()
Get the list of unsafe XML attributes.
$this
setUnsafeAttributes(string|string[] $value)
Set the list of unsafe XML attributes.
string[]
getElementWhitelist()
Get the list of XML elements to not consider as unsafe.
$this
setElementWhitelist(string|string[] $value)
Set the list of XML elements to not consider as unsafe.
string[]
getAttributeWhitelist()
Get the list of XML attributes to not consider as unsafe.
$this
setAttributeWhitelist(string|string[] $value)
Set the list of XML attributes to not consider as unsafe.
protected string[]
normalizeStringList(string|array $value)
Takes an array, keeps only strings, makes them lowercase, and returns the unique values.