function hook_htmlpurifier_html_definition_alter in HTML Purifier 7.2
Same name and namespace in other branches
- 7 htmlpurifier.api.php \hook_htmlpurifier_html_definition_alter()
Implements hook_htmlpurifier_html_definition_alter().
Allows modules to alter the HTML Definition used by HTML Purifier.
Parameters
HTMLPurifier_HTMLDefinition $html_definition: The HTMLPurifier definition object to alter.
1 invocation of hook_htmlpurifier_html_definition_alter()
- _htmlpurifier_get_config in ./
htmlpurifier.module - Returns the HTMLPurifier_Config object corresponding to a text format.
File
- ./
htmlpurifier.api.php, line 50 - API documentation for the HTML Purifier module.
Code
function hook_htmlpurifier_html_definition_alter($html_definition) {
// Allow to use the 'data-type' attribute on images.
$html_definition
->addAttribute('img', 'data-type', 'Text');
}