ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilAccessibilityTrimmedDocumentPurifier.php
Go to the documentation of this file.
1<?php
2
23{
25
27 {
28 $this->inner = $inner;
29 }
30
31 public function purify(string $html): string
32 {
33 return trim($this->inner->purify($html));
34 }
35
36 public function purifyArray(array $htmlCollection): array
37 {
38 foreach ($htmlCollection as $key => $html) {
39 $htmlCollection[$key] = $this->purify($html);
40 }
41
42 return $htmlCollection;
43 }
44}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.