public static function normalise($html)
    {
        $rules = array(
            '#<!--.*?-->#si',
            '#<(script|option|textarea)[^>]*>.*?</\1>#si',
            '#<img[^>]*alt\s*=\s*("([^"]*)"|\'([^\']*)\'|([a-zA-Z_]+))[^>]*>#',
            '#<[^>]*>#',
        );

        $replace = array(
            '',
            '',
            ' \2\3\4 ',
            '',
        );

        $text = preg_replace($rules, $replace, $html);
        $text = html_entity_decode($text, ENT_QUOTES);
        $text = preg_replace('#\s+#', ' ', $text);

        return trim(trim($text), "\xA0");        // @todo The \xAO is a &nbsp;. Add a test for this.
    }