19declare(strict_types=1);
25use HTMLPurifier_Config;
48 $this->create_config =
$create_config ?? HTMLPurifier_Config::createDefault(...);
55 $config->set(
'HTML.DefinitionID',
'ilias termsofservice document');
56 $config->set(
'HTML.DefinitionRev', 1);
57 $config->set(
'HTML.TargetBlank',
true);
58 $config->set(
'Cache.SerializerPath', $this->cache_directory);
59 $config->set(
'HTML.Doctype',
'XHTML 1.0 Strict');
67 $config->set(
'HTML.ForbiddenAttributes',
'div@style');
69 if (($def = $config->maybeGetRawHTMLDefinition()) !==
null) {
70 $def->addAttribute(
'a',
'target',
'Enum#_blank,_self,_target,_top');
readonly array $allowed_tags
getPurifierConfigInstance()
readonly Closure $create_config
readonly string $cache_directory
__construct(?array $allowed_tags=null, ?string $cache_directory=null, ?Closure $create_config=null)
Abstract class wrapping the HTMLPurifier instance.
removeUnsupportedElements(array $elements)
Removes all unsupported elements.
makeElementListTinyMceCompliant(array $elements)
static _getCacheDirectory()
static _getUsedHTMLTags(string $module='')
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc