ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
class.ilMailBodyPurifier.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 {
23  public function purify(string $content): string
24  {
25  $sanitized_content = ilUtil::stripSlashes($content);
26  if ($sanitized_content !== $content) {
27  $sanitized_content = ilUtil::stripSlashes(str_replace('<', '< ', $content));
28  }
29 
30  return str_replace(chr(13), '', $sanitized_content);
31  }
32 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")