Skip to content

Commit

Permalink
more script parsing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rbri committed Jan 9, 2024
1 parent 2a6f624 commit a66b20f
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<head><script>sc</scrip
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(HTML
(head
(script
"sc</scrip
)script
)head
(body
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<head><script>scRipt</script >
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(HTML
(head
(script
"scRipt
)script
)head
(body
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<head><script><!--sc</scrip
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(HTML
(head
(script
"<!--sc</scrip
)script
)head
(body
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script><!-- console.log('a'); --> console.log('b');</script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"<!-- console.log('a'); --> console.log('b');
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<head><script><!-- scRipt</script >
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(HTML
(head
(script
"<!-- scRipt
)script
)head
(body
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<body><script>console.log('<div>'); console.log('</div>');</script>abc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(HTML
(head
)head
(body
(script
"console.log('<div>'); console.log('</div>');
)script
"abc
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<head><script><!-- outer <scriptis strange</script>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(HTML
(head
(script
"<!-- outer <scriptis strange
)script
)head
(body
)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,9 @@
(HTML
(head
(script
"<!-- outer <script >inner</script>OUTER</script>
)script
)head
(body
)body
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script>
<!-- on comment line
html script content
--!>
</script>
<h1>Foo</h1>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
(HTML
(HEAD
(script
" on comment line\nhtml script content\n
)script
"\n
)HEAD
(BODY
(h1
"Foo
)h1
)BODY
)HTML
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
feature http://cyberneko.org/html/features/scanner/script/strip-comment-delims true

0 comments on commit a66b20f

Please sign in to comment.