19 declare(strict_types=1);
41 ?array $allowed_tags = null,
42 ?
string $cache_directory = null,
47 $this->create_config = $create_config ?? HTMLPurifier_Config::createDefault(...);
54 $config->set(
'HTML.DefinitionID',
'ilias termsofservice document');
55 $config->set(
'HTML.DefinitionRev', 1);
56 $config->set(
'HTML.TargetBlank',
true);
57 $config->set(
'Cache.SerializerPath', $this->cache_directory);
58 $config->set(
'HTML.Doctype',
'XHTML 1.0 Strict');
66 $config->set(
'HTML.ForbiddenAttributes',
'div@style');
68 if (($def = $config->maybeGetRawHTMLDefinition()) !== null) {
69 $def->addAttribute(
'a',
'target',
'Enum#_blank,_self,_target,_top');
__construct(?array $allowed_tags=null, ?string $cache_directory=null, ?Closure $create_config=null)
static _getCacheDirectory()
makeElementListTinyMceCompliant(array $elements)
removeUnsupportedElements(array $elements)
Removes all unsupported elements.
getPurifierConfigInstance()
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.