27 public function __construct(array $allowedTags = null,
string $cacheDirectory = null)
29 if (null === $cacheDirectory) {
34 if (null === $allowedTags) {
45 $config = HTMLPurifier_Config::createDefault();
46 $config->set(
'HTML.DefinitionID',
'ilias accessibility document');
47 $config->set(
'HTML.DefinitionRev', 1);
48 $config->set(
'HTML.TargetBlank',
true);
49 $config->set(
'Cache.SerializerPath', $this->cacheDirectory);
50 $config->set(
'HTML.Doctype',
'XHTML 1.0 Strict');
59 $config->set(
'HTML.ForbiddenAttributes',
'div@style');
61 if ($def =
$config->maybeGetRawHTMLDefinition()) {
62 $def->addAttribute(
'a',
'target',
'Enum#_blank,_self,_target,_top');
getPurifierConfigInstance()
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(array $allowedTags=null, string $cacheDirectory=null)
static _getCacheDirectory()
makeElementListTinyMceCompliant(array $elements)
removeUnsupportedElements(array $elements)
Removes all unsupported elements.
Abstract class wrapping the HTMLPurifier instance.
__construct(Container $dic, ilPlugin $plugin)
static _getUsedHTMLTags(string $a_module="")
Returns an array of all allowed HTML tags for text editing.