public function clean($string, $allowedTags = null)
    {
        if (is_array($string)) {
            $new_array = array();
            foreach ($string as $key => $val) {
                $new_array[$key] = $this->clean($val, $allowedTags);
            }
            return $new_array;
        }

        $string = $this->cleanHTMLPurify($string, $allowedTags);

        return str_replace(array("\r\n", "\r"), "\n", $string);
    }