Mercurial > genshi > genshi-test
diff markup/tests/core.py @ 91:e82d1bb07464
Some subtle fixes to generation and sanitization.
author | cmlenz |
---|---|
date | Thu, 20 Jul 2006 16:55:26 +0000 |
parents | 822089ae65ce |
children | e815c2c07572 |
line wrap: on
line diff
--- a/markup/tests/core.py +++ b/markup/tests/core.py @@ -123,9 +123,9 @@ markup = Markup('<SCRIPT SRC="http://example.com/"></SCRIPT>') self.assertEquals('', str(markup.sanitize())) markup = Markup('<SCR\0IPT>alert("foo")</SCR\0IPT>') - self.assertRaises(ParseError, markup.sanitize().render) + self.assertRaises(ParseError, markup.sanitize) markup = Markup('<SCRIPT&XYZ SRC="http://example.com/"></SCRIPT>') - self.assertRaises(ParseError, markup.sanitize().render) + self.assertRaises(ParseError, markup.sanitize) def test_sanitize_remove_onclick_attr(self): markup = Markup('<div onclick=\'alert("foo")\' />') @@ -156,7 +156,7 @@ self.assertEquals('<img/>', str(markup.sanitize())) # Grave accents (not parsed) markup = Markup('<IMG SRC=`javascript:alert("RSnake says, \'foo\'")`>') - self.assertRaises(ParseError, markup.sanitize().render) + self.assertRaises(ParseError, markup.sanitize) # Protocol encoded using UTF-8 numeric entities markup = Markup('<IMG SRC=\'javascri' 'pt:alert("foo")\'>')