ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilAccessibilityTrimmedDocumentPurifier.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
12 protected $inner;
13
19 {
20 $this->inner = $inner;
21 }
22
26 public function purify(string $html) : string
27 {
28 return trim($this->inner->purify($html));
29 }
30
34 public function purifyArray(array $htmlCollection) : array
35 {
36 foreach ($htmlCollection as $key => $html) {
37 $htmlCollection[$key] = $this->purify($html);
38 }
39
40 return $htmlCollection;
41 }
42}
An exception for terminatinating execution or to throw for unit testing.
__construct(ilHtmlPurifierInterface $inner)
ilAccessibilityTrimmedDocumentPurifier constructor.
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.string
Interface for html sanitizing functionality.