ILIAS  release_7 Revision v7.30-3-g800a261c036
ilExcInstructionPurifier Class Reference
+ Inheritance diagram for ilExcInstructionPurifier:
+ Collaboration diagram for ilExcInstructionPurifier:

Public Member Functions

 __construct ()
 ilHtmlPurifierAbstractLibWrapper constructor. More...
 
- Public Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
 __construct ()
 ilHtmlPurifierAbstractLibWrapper constructor. More...
 
 purify (string $html)
 @inheritDoc More...
 
 purifyArray (array $htmlCollection)
 @inheritDoc More...
 
 purify (string $html)
 Filters an HTML snippet/document to be XSS-free and standards-compliant. More...
 
 purifyArray (array $htmlCollection)
 Filters an array of HTML snippets/documents to be XSS-free and standards-compliant. More...
 

Protected Member Functions

 getPurifierConfigInstance ()
 
- Protected Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
 getPurifierConfigInstance ()
 
 setPurifier (HTMLPurifier $purifier)
 
 getPurifier ()
 
 removeUnsupportedElements (array $elements)
 Removes all unsupported elements. More...
 
 makeElementListTinyMceCompliant (array $elements)
 

Protected Attributes

const TAGSET = ["strong", "em", "u", "ol", "li", "ul", "blockquote", "a", "p", "span", "br"]
 
- Protected Attributes inherited from ilHtmlPurifierAbstractLibWrapper
 $purifier
 

Additional Inherited Members

- Static Public Member Functions inherited from ilHtmlPurifierAbstractLibWrapper
static _getCacheDirectory ()
 

Detailed Description

Definition at line 21 of file class.ilExcInstructionPurifier.php.

Constructor & Destructor Documentation

◆ __construct()

ilExcInstructionPurifier::__construct ( )

ilHtmlPurifierAbstractLibWrapper constructor.

Reimplemented from ilHtmlPurifierAbstractLibWrapper.

Definition at line 26 of file class.ilExcInstructionPurifier.php.

27 {
29 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ getPurifierConfigInstance()

ilExcInstructionPurifier::getPurifierConfigInstance ( )
protected
Returns
HTMLPurifier_Config

Reimplemented from ilHtmlPurifierAbstractLibWrapper.

Definition at line 31 of file class.ilExcInstructionPurifier.php.

31 : HTMLPurifier_Config
32 {
33 $config = HTMLPurifier_Config::createDefault();
34 $config->set('HTML.DefinitionID', 'ilias exercise instruction');
35 $config->set('HTML.DefinitionRev', 1);
37 $config->set('HTML.Doctype', 'XHTML 1.0 Strict');
38
39 $tags = $this->makeElementListTinyMceCompliant(self::TAGSET);
40 $config->set('HTML.AllowedElements', $this->removeUnsupportedElements($tags));
41 $config->set('HTML.ForbiddenAttributes', 'div@style');
42
43 if ($def = $config->maybeGetRawHTMLDefinition()) {
44 $def->addAttribute('a', 'target', 'Enum#_blank,_self,_target,_top');
45 }
46
47 return $config;
48 }
removeUnsupportedElements(array $elements)
Removes all unsupported elements.
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

References $config, ilHtmlPurifierAbstractLibWrapper\_getCacheDirectory(), ilHtmlPurifierAbstractLibWrapper\makeElementListTinyMceCompliant(), and ilHtmlPurifierAbstractLibWrapper\removeUnsupportedElements().

+ Here is the call graph for this function:

Field Documentation

◆ TAGSET

const ilExcInstructionPurifier::TAGSET = ["strong", "em", "u", "ol", "li", "ul", "blockquote", "a", "p", "span", "br"]
protected

Definition at line 24 of file class.ilExcInstructionPurifier.php.


The documentation for this class was generated from the following file: