ladybird/Tests/LibWeb/tokenizer-test.html
Max Wipfli 2404ad6897 LibWeb: Fix assertion failure when tokenizing JS regex literals
This fixes parsing the following regular expression: /</g;

It also adds a simple script element to the HTMLTokenizer regression
test, which also contains that specific regex.
2021-07-15 01:47:22 +02:00

21 lines
594 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>This is a test page :^)</title>
<script>
let foo = 2;
var bar = 3;
if (foo < bar)
alert("Check happens with HTML special <characters>.");
let regex = /</g;
</script>
</head>
<body>
<p>This is the first paragraph.</p>
<p foo="bar">The second paragraph has an attribute!</p>
<!-- This is a standard HTML comment. -->
<!----- This comment has a few too many dashes. ----->
<!----> <!-- <= There is an empty comment over there. -->
</body>
</html>