Skip to content

Commit

Permalink
more tests for script parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Jan 9, 2024
1 parent 942bcac commit 2a6f624
Show file tree
Hide file tree
Showing 17 changed files with 92 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(HTML
(HEAD
(script
)script
)HEAD
(body
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script><!-- console.log('a'); --!></script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"<!-- console.log('a'); --!>
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
"\n
(script
Alanguage javascript
"<!-- alert(1);</script>\n<script language='javascript'>alert(1);-->
"<!-- alert(1);
)script
"\n
(script
Alanguage javascript
"alert(1);-->
)script
"\n
)head
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script><!-- console.log('<script>'); console.log('</script>'); --></script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"<!-- console.log('<script>'); console.log('</script>'); -->
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script><!-- console.log('a'); --></script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"<!-- console.log('a'); -->
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<head><script>outer<script>inner</script>OUTER</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
(script
"outer<script>inner
)script
)head
(body
"OUTER
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script>console.log('a'); --!></script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"console.log('a'); --!>
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script>console.log('a'); --></script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"console.log('a'); -->
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script>console.log('<script>'); console.log('</script>');</script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"console.log('<script>'); console.log('
)script
"');abc
)body
)HTML

0 comments on commit 2a6f624

Please sign in to comment.