ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilWebDAVMountInstructionsHtmlDocumentProcessor.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22{
23 public function __construct(protected ilHtmlPurifierInterface $document_purifier)
24 {
25 }
26
27 public function processMountInstructions(string $a_raw_mount_instructions): array
28 {
29 $purified_html_content = $this->document_purifier->purify($a_raw_mount_instructions);
30
31 $html_validator = new ilWebDAVMountInstructionsDocumentsContainsHtmlValidator($purified_html_content);
32 if (!$html_validator->isValid()) {
33 $purified_html_content = nl2br($purified_html_content);
34 }
35
36 return $this->parseInstructionsToAssocArray($purified_html_content);
37 }
38}
Interface for html sanitizing functionality.