1 <?php declare(strict_types=1);
22 $key = array_search($purifier, $this->purifiers);
24 $this->purifiers[] = $purifier;
38 $key = array_search($purifier, $this->purifiers);
42 unset($this->purifiers[$key]);
50 public function purify(
string $html) : string
52 foreach ($this->purifiers as $purifier) {
53 $html = $purifier->purify($html);
64 foreach ($htmlCollection as $key => $html) {
65 foreach ($this->purifiers as $purifier) {
66 $html = $purifier->purify($html);
69 $htmlCollection[$key] = $html;
72 return $htmlCollection;
addPurifier(ilHtmlPurifierInterface $purifier)
Adds a node to composite.
purifyArray(array $htmlCollection)
Composite for nesting multiple purifiers.
Interface for html sanitizing functionality.
removePurifier(ilHtmlPurifierInterface $purifier)
Removes a node from composite.