public function hclass($classes, $raw = false)
    {
        if (is_array($classes)) {
            $classes = implode(' ', $classes);
        }
        $classes = preg_split('/ +/', trim($classes));
        $classes = implode(' ', $classes);

        if ($raw) {
            return $classes;
        }

        return $classes ? ' class="' . htmlspecialchars($classes) . '"' : '';
    }