public function entities($value)
    {
        if (is_array($value)) {
            $newValue = array();
            foreach ($value as $key => $val) {
                $newValue[$key] = htmlentities($val, ENT_QUOTES, 'UTF-8', false);
            }

            return $newValue;
        }

        return htmlentities($value, ENT_QUOTES, 'UTF-8', false);
    }