ILIAS  release_8 Revision v8.24
class.ilWebDAVMountInstructionsHtmlDocumentProcessor.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
22{
24
25 public function __construct(ilHtmlPurifierInterface $a_document_purifier)
26 {
27 $this->document_purifier = $a_document_purifier;
28 }
29
30 public function processMountInstructions(string $a_raw_mount_instructions): array
31 {
32 $purified_html_content = $this->document_purifier->purify($a_raw_mount_instructions);
33
34 $html_validator = new ilWebDAVMountInstructionsDocumentsContainsHtmlValidator($purified_html_content);
35 if (!$html_validator->isValid()) {
36 $purified_html_content = nl2br($purified_html_content);
37 }
38
39 return $this->parseInstructionsToAssocArray($purified_html_content);
40 }
41}
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface for html sanitizing functionality.