ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilAccessibilityTrimmedDocumentPurifier Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilAccessibilityTrimmedDocumentPurifier:
+ Collaboration diagram for ilAccessibilityTrimmedDocumentPurifier:

Public Member Functions

 __construct (ilHtmlPurifierInterface $inner)
 
 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 Attributes

ilHtmlPurifierInterface $inner
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilAccessibilityTrimmedDocumentPurifier

Definition at line 22 of file class.ilAccessibilityTrimmedDocumentPurifier.php.

Constructor & Destructor Documentation

◆ __construct()

ilAccessibilityTrimmedDocumentPurifier::__construct ( ilHtmlPurifierInterface  $inner)

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

References $inner.

27  {
28  $this->inner = $inner;
29  }

Member Function Documentation

◆ purify()

ilAccessibilityTrimmedDocumentPurifier::purify ( string  $html)

Filters an HTML snippet/document to be XSS-free and standards-compliant.

Parameters
string$html
Returns
string

Implements ilHtmlPurifierInterface.

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

Referenced by purifyArray().

31  : string
32  {
33  return trim($this->inner->purify($html));
34  }
+ Here is the caller graph for this function:

◆ purifyArray()

ilAccessibilityTrimmedDocumentPurifier::purifyArray ( array  $htmlCollection)

Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.

Parameters
string[]$htmlCollection
Returns
string[]
Exceptions
InvalidArgumentExceptionIf one of the arrays element is not of tpye string

Implements ilHtmlPurifierInterface.

Definition at line 36 of file class.ilAccessibilityTrimmedDocumentPurifier.php.

References ILIAS\LTI\ToolProvider\$key, and purify().

36  : array
37  {
38  foreach ($htmlCollection as $key => $html) {
39  $htmlCollection[$key] = $this->purify($html);
40  }
41 
42  return $htmlCollection;
43  }
purify(string $html)
Filters an HTML snippet/document to be XSS-free and standards-compliant.
string $key
Consumer key/client ID value.
Definition: System.php:193
+ Here is the call graph for this function:

Field Documentation

◆ $inner

ilHtmlPurifierInterface ilAccessibilityTrimmedDocumentPurifier::$inner
protected

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

Referenced by __construct().


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