public function clean($mixed, $stripTags = true, $htmlEntities = true)
    {
        if (is_array($mixed)) {
            foreach ($mixed as $key => $value) {
                $mixed[$key] = self::clean($value, $stripTags, $htmlEntities);
            }

        } else {
            if ($stripTags === true) {
                $mixed = strip_tags($mixed);
            }

            if ($htmlEntities === true) {
                $mixed = htmlentities($mixed);
            }
        }

        return $mixed;
    }
public function clean($mixed, $stripTags = true, $htmlEntities = true)
    {
        if (is_array($mixed)) {
            foreach ($mixed as $key => $value) {
                $mixed[$key] = self::clean($value, $stripTags, $htmlEntities);
            }

        } else {
            if ($stripTags === true) {
                $mixed = strip_tags($mixed);
            }

            if ($htmlEntities === true) {
                $mixed = htmlentities($mixed);
            }
        }

        return $mixed;
    }
public function clean ( $ mixed , $ stripTags = true , $ htmlEntities = true ) { if ( is_array ( $ mixed ) ) { foreach ( $ mixed as $ key => $ value ) { $ mixed [ $ key ] = self :: clean ( $ value , $ stripTags , $ htmlEntities ) ; } } else { if ( $ stripTags === true ) { $ mixed = strip_tags ( $ mixed ) ; } if ( $ htmlEntities === true ) { $ mixed = htmlentities ( $ mixed ) ; } } return $ mixed ; }
Cleans the input variable. This method removes tags with strip_tags and afterwards
it turns all non-safe characters to its htmlentities.

@param mixed   $mixed        The input to clean
@param bool $stripTags    TRUE to strip tags from mixed, otherwise FALSE to do not
@param bool $htmlEntities TRUE to convert non-url safe characters to URL-encoded values, FALSE to do not

@author Benjamin Carl <opensource@clickalicious.de>
@return mixed The cleaned input
@access public
Cleans the input variable . This method removes tags with strip_tags and afterwards it turns all non - safe characters to its htmlentities .