ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 }
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled