ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
class.ilTermsOfServiceTrimmedDocumentPurifier.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
9{
13 protected $inner;
14
20 {
21 $this->inner = $inner;
22 }
23
27 public function purify($a_html)
28 {
29 return trim($this->inner->purify($a_html));
30 }
31
35 public function purifyArray(array $a_array_of_html)
36 {
37 foreach ($a_array_of_html as $key => $html) {
38 $a_array_of_html[$key] = $this->purify($html);
39 }
40
41 return $a_array_of_html;
42 }
43}
An exception for terminatinating execution or to throw for unit testing.
purify($a_html)
Filters an HTML snippet/document to be XSS-free and standards-compliant.@access public
purifyArray(array $a_array_of_html)
Filters an array of HTML snippets/documents to be XSS-free and standards-compliant....
__construct(\ilHtmlPurifierInterface $inner)
ilTermsOfServiceTrimmedDocumentPurifier constructor.
$key
Definition: croninfo.php:18
$html
Definition: example_001.php:87
Interface for html sanitizing functionality.