Edgewall Software

Ticket #529: genshi_tests.diff

File genshi_tests.diff, 1.3 KB (added by Nicolas Évrard <nicolas.evrard@…>, 3 years ago)

patch for genshi/filters/tests/test_html.py

  • genshi/filters/tests/test_html.py

     
    408408        self.assertEquals('', (html | HTMLSanitizer()).render())
    409409        html = HTML(u'<SCRIPT SRC="http://example.com/"></SCRIPT>')
    410410        self.assertEquals('', (html | HTMLSanitizer()).render())
    411         self.assertRaises(ParseError, HTML, u'<SCR\0IPT>alert("foo")</SCR\0IPT>')
    412         self.assertRaises(ParseError, HTML,
    413                           u'<SCRIPT&XYZ SRC="http://example.com/"></SCRIPT>')
    414411
    415412    def test_sanitize_remove_onclick_attr(self):
    416413        html = HTML(u'<div onclick=\'alert("foo")\' />')
     
    480477        # Case-insensitive protocol matching
    481478        html = HTML(u'<IMG SRC=\'JaVaScRiPt:alert("foo")\'>')
    482479        self.assertEquals('<img/>', (html | HTMLSanitizer()).render())
    483         # Grave accents (not parsed)
    484         self.assertRaises(ParseError, HTML,
    485                           u'<IMG SRC=`javascript:alert("RSnake says, \'foo\'")`>')
    486480        # Protocol encoded using UTF-8 numeric entities
    487481        html = HTML(u'<IMG SRC=\'&#106;&#97;&#118;&#97;&#115;&#99;&#114;&#105;'
    488482                    '&#112;&#116;&#58;alert("foo")\'>')