ILIAS  release_8 Revision v8.24
HTMLUtil.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24use ILIAS\HTTP;
26
28{
29 public function __construct()
30 {
31 }
32
33 public function escape(string $input): string
34 {
35 return htmlentities($input);
36 }
37
38 public function strip(string $input): string
39 {
40 // see https://www.ilias.de/mantis/view.php?id=19727
41 $str = \ilUtil::stripSlashes($input);
42 if ($str !== $input) {
43 $str = \ilUtil::stripSlashes(str_replace("<", "< ", $input));
44 }
45 return $str;
46 }
47}
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...