ILIAS  release_8 Revision v8.23
ilTermsOfServiceTrimmedDocumentPurifier Class Reference

Class ilTermsOfServiceTrimmedDocumentPurifier. More...

+ Inheritance diagram for ilTermsOfServiceTrimmedDocumentPurifier:
+ Collaboration diagram for ilTermsOfServiceTrimmedDocumentPurifier:

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

Constructor & Destructor Documentation

◆ __construct()

ilTermsOfServiceTrimmedDocumentPurifier::__construct ( ilHtmlPurifierInterface  $inner)

Definition at line 29 of file class.ilTermsOfServiceTrimmedDocumentPurifier.php.

References $inner.

30  {
31  $this->inner = $inner;
32  }

Member Function Documentation

◆ purify()

ilTermsOfServiceTrimmedDocumentPurifier::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 34 of file class.ilTermsOfServiceTrimmedDocumentPurifier.php.

Referenced by purifyArray().

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

◆ purifyArray()

ilTermsOfServiceTrimmedDocumentPurifier::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 39 of file class.ilTermsOfServiceTrimmedDocumentPurifier.php.

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

39  : array
40  {
41  foreach ($htmlCollection as $key => $html) {
42  $htmlCollection[$key] = $this->purify($html);
43  }
44 
45  return $htmlCollection;
46  }
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 ilTermsOfServiceTrimmedDocumentPurifier::$inner
protected

Definition at line 27 of file class.ilTermsOfServiceTrimmedDocumentPurifier.php.

Referenced by __construct().


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