Add a couple of additional XSS tests

BUG=

Review URL: https://codereview.chromium.org/2160413002 .
This commit is contained in:
Alan Knight 2016-07-19 13:37:45 -07:00
parent b5c34db44c
commit 4db29e8fbc

View file

@ -116,6 +116,14 @@ main() {
validator,
'<span>![CDATA[ some text ]]></span>');
testHtml('backquotes not removed',
validator,
'<img src="dice.png" alt="``onload=xss()" />');
testHtml('0x3000 not removed',
validator,
'<a href="&#x3000;javascript:alert(1)">CLICKME</a>');
test('sanitizes template contents', () {
if (!TemplateElement.supported) return;