diff --git a/openerp/tests/test_mail.py b/openerp/tests/test_mail.py index 36d49e34997..3e822cb190e 100755 --- a/openerp/tests/test_mail.py +++ b/openerp/tests/test_mail.py @@ -82,12 +82,8 @@ class TestSanitizer(unittest2.TestCase): self.assertNotIn('javascript', html, 'html_sanitize did not remove a malicious javascript') self.assertTrue('ha.ckers.org' not in html or 'http://ha.ckers.org/xss.css' in html, 'html_sanitize did not remove a malicious code in %s (%s)' % (content, html)) - # Raise an exception if the node is an empty string without any root tag - with self.assertRaises(etree.ParserError): - content = "" # down-level hidden block - html = html_sanitize(content, silent=False) - - + content = "" # down-level hidden block + self.assertEquals(html_sanitize(content, silent=False), '') def test_html(self): sanitized_html = html_sanitize(test_mail_examples.MISC_HTML_SOURCE)