ILIAS  release_8 Revision v8.24
class.ilTermsOfServiceTrimmedDocumentPurifier.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
26{
28
30 {
31 $this->inner = $inner;
32 }
33
34 public function purify(string $html): string
35 {
36 return trim($this->inner->purify($html));
37 }
38
39 public function purifyArray(array $htmlCollection): array
40 {
41 foreach ($htmlCollection as $key => $html) {
42 $htmlCollection[$key] = $this->purify($html);
43 }
44
45 return $htmlCollection;
46 }
47}
purifyArray(array $htmlCollection)
Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.
purify(string $html)
Filters an HTML snippet/document to be XSS-free and standards-compliant.
Interface for html sanitizing functionality.
string $key
Consumer key/client ID value.
Definition: System.php:193