HtmlEditorSanitiser
class HtmlEditorSanitiser (View source)
Sanitises an HTMLValue so it's contents are the elements and attributes that are whitelisted using the same configuration as TinyMCE
See www.tinymce.com/wiki.php/configuration:valid_elements for details on the spec of TinyMCE's whitelist configuration
Methods
Given an SS_HTMLValue instance, will remove and elements and attributes that are not explicitly included in the whitelist passed to __construct on instance creation
Details
__construct(HtmlEditorConfig $config)
Construct a sanitiser from a given HtmlEditorConfig
Note that we build data structures from the current state of HtmlEditorConfig - later changes to the passed instance won't cause this instance to update it's whitelist
sanitise(SS_HTMLValue $html)
Given an SS_HTMLValue instance, will remove and elements and attributes that are not explicitly included in the whitelist passed to __construct on instance creation