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);
    }
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);
    }
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 ) ; }
Cleans XSS by removing all tags

@param string $string to clean

@return string cleaned
Cleans XSS by removing all tags