PHP Interface Bolt\Storage\Field\Sanitiser\SanitiserInterface

Author: Gawain Lynch ([email protected])
Show file Open project: bolt/bolt

Public Methods

Method Description
getAllowedAttributes ( ) : array Return the list of allowed attributes.
getAllowedTags ( ) : array Return the list of allowed HTML tags.
sanitise ( string $value, boolean $isWysiwyg = false ) : string Sanitise HTML, by allowing only white-listed tags and attributes.
setAllowedAttributes ( array $allowedAttributes ) : Bolt\Storage\Field\Sanitiser\SanitiserInterface Override the allowed attributes.
setAllowedTags ( array $allowedTags ) : Bolt\Storage\Field\Sanitiser\SanitiserInterface Override the allowed HTML tags.

Method Details

getAllowedAttributes() public method

Return the list of allowed attributes.
public getAllowedAttributes ( ) : array
return array

getAllowedTags() public method

Return the list of allowed HTML tags.
public getAllowedTags ( ) : array
return array

sanitise() public method

Sanitise HTML, by allowing only white-listed tags and attributes.
public sanitise ( string $value, boolean $isWysiwyg = false ) : string
$value string A string value to sanitize.
$isWysiwyg boolean True if the field should allow HTML tags needed for WYSIWYG fields.
return string

setAllowedAttributes() public method

Override the allowed attributes.
public setAllowedAttributes ( array $allowedAttributes ) : Bolt\Storage\Field\Sanitiser\SanitiserInterface
$allowedAttributes array
return Bolt\Storage\Field\Sanitiser\SanitiserInterface

setAllowedTags() public method

Override the allowed HTML tags.
public setAllowedTags ( array $allowedTags ) : Bolt\Storage\Field\Sanitiser\SanitiserInterface
$allowedTags array
return Bolt\Storage\Field\Sanitiser\SanitiserInterface