Another script test

main
Bob Mottram 2020-11-15 10:36:24 +00:00
parent a7972ffba0
commit 1f1cbd3eea
1 changed files with 5 additions and 0 deletions

View File

@ -1952,6 +1952,11 @@ def testDangerousMarkup():
'.innerHTML = "evil";</script></p>'
assert(dangerousMarkup(content))
content = '<p>This html contains more than you expected... ' + \
'<script language="javascript">document.getElementById("abc")' + \
'.innerHTML = "def";</script></p>'
assert(dangerousMarkup(content))
content = '<p>This is a valid-looking message. But wait... ' + \
'<script src="https://evilsite/payload.js" /></p>'
assert(dangerousMarkup(content))