ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 */
7{
12 public function purify($content)
13 {
14 $sanitizedContent = \ilUtil::stripSlashes($content);
15 if ($sanitizedContent !== $content) {
16 $sanitizedContent = \ilUtil::stripSlashes(str_replace('<', '< ', $content));
17 }
18 $sanitizedContent = str_replace("\r", '', $sanitizedContent);
19 return $sanitizedContent;
20 }
21}
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