ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilAccessibilityTrimmedDocumentPurifier.php
Go to the documentation of this file.
1 <?php
2 
23 {
25 
26  public function __construct(ilHtmlPurifierInterface $inner)
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 }
purifyArray(array $htmlCollection)
Filters an array of HTML snippets/documents to be XSS-free and standards-compliant.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface for html sanitizing functionality.
purify(string $html)
Filters an HTML snippet/document to be XSS-free and standards-compliant.