Skip to content

Commit

Permalink
Suppress another 'assertNotIn' FBO Python 2.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Oct 29, 2014
1 parent 39d64c1 commit 18b98b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/OFS/tests/testFileAndImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,13 @@ def test_interfaces(self):
class ImagePublishTests(Testing.ZopeTestCase.FunctionalTestCase):
def testTagSafe(self):
self.app.manage_addImage("image", "")
res = self.publish("/image/tag?height=0&width=0&css_class=%22%3E%3Cscript%20type%3D%22text%2Fjavascript%22%3Ealert('evil')%3B%3C%2Fscript%3E%3Cdiv%20class%3D%22")
self.assertNotIn('<script type="text/javascript">alert(\'evil\');</script>', res.getBody())
res = self.publish(
"/image/tag?height=0&width=0&css_class=%22%3E%3Cscript%20type"
"%3D%22text%2Fjavascript%22%3Ealert('evil')%3B%3C%2Fscript"
"%3E%3Cdiv%20class%3D%22")
self.assertFalse(
'<script type="text/javascript">alert(\'evil\');</script>'
in res.getBody())


def test_suite():
Expand Down

0 comments on commit 18b98b1

Please sign in to comment.