ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables 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="")