mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
Add a couple of additional XSS tests
BUG= Review URL: https://codereview.chromium.org/2160413002 .
This commit is contained in:
parent
b5c34db44c
commit
4db29e8fbc
1 changed files with 8 additions and 0 deletions
|
@ -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=" javascript:alert(1)">CLICKME</a>');
|
||||
|
||||
test('sanitizes template contents', () {
|
||||
if (!TemplateElement.supported) return;
|
||||
|
||||
|
|
Loading…
Reference in a new issue