ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilMailBodyPurifier.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2018 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
13 public function purify(string $content) : string
14 {
15 $sanitizedContent = \ilUtil::stripSlashes($content);
16
17 if ($sanitizedContent !== $content) {
18 $sanitizedContent = \ilUtil::stripSlashes(str_replace('<', '< ', $content));
19 }
20 $sanitizedContent = str_replace("\r", '', $sanitizedContent);
21
22 return $sanitizedContent;
23 }
24}
An exception for terminatinating execution or to throw for unit testing.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled