ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
class.ilMailBodyPurifier.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
25 {
26  public function purify(string $content): string
27  {
28  $sanitizedContent = ilUtil::stripSlashes($content);
29 
30  if ($sanitizedContent !== $content) {
31  $sanitizedContent = ilUtil::stripSlashes(str_replace('<', '< ', $content));
32  }
33 
34  return str_replace(chr(13), '', $sanitizedContent);
35  }
36 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")