protected function minify($html)
    {
        $html = str_replace('<?xml encoding="UTF-8">', '', $html);

        $html = trim(preg_replace('/\s+/', ' ', $html));

        $html = str_replace('> <', '><', $html);

        return str_replace(array(' />', '/>'), '>', $html);
    }