ILIAS  trunk Revision v12.0_alpha-1540-g00f839d5fa1
HtmlDocumentProcessor.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
21namespace ILIAS\WebDAV\Mount;
22
24
26{
27 public function __construct(protected ilHtmlPurifierInterface $document_purifier)
28 {
29 }
30
31 public function processMountInstructions(string $a_raw_mount_instructions): array
32 {
33 $purified_html_content = $this->document_purifier->purify($a_raw_mount_instructions);
34
35 $html_validator = new ContainsHtmlValidator($purified_html_content);
36 if (!$html_validator->isValid()) {
37 $purified_html_content = nl2br($purified_html_content);
38 }
39
40 return $this->parseInstructionsToAssocArray($purified_html_content);
41 }
42}
parseInstructionsToAssocArray(string $a_raw_mount_instructions)
__construct(protected ilHtmlPurifierInterface $document_purifier)
processMountInstructions(string $a_raw_mount_instructions)
Interface for html sanitizing functionality.