@errors.callback
    def filter(self, result):
        try:
            # Remove comments because HTML allows things in
            # comments that XML does not. Are there other
            # things that I should be filtering?
            parser = etree.HTMLParser(remove_comments=True)
            html = etree.parse(StringIO(result), parser)
        except etree.XMLSyntaxError, ex:
            raise errors.TestCritical("Invalid HTML: %s" % ex)

        return etree.tostring(html, pretty_print=True)
dataset/ETHPy150Open marineam/nagcat/python/nagcat/plugins/filter_xml.py/HtmlFilter.filter/original