HTML raw text contains JS code

Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

1<!DOCTYPE html>
2<script src="include.js"></script>
3<script>
4var echoPort = internals.getEchoServerPort();
5var baseURL = `http://127.0.0.1:${echoPort}`;
6var xhr = new XMLHttpRequest();
7xhr.open("POST", `${baseURL}/echo`, false);
8xhr.setRequestHeader("Content-Type", "application/json");
9xhr.send(JSON.stringify({
10 method: "GET",
11 path: "/delayed-green.png",
12 status: 200,
13 headers: {"Content-Type": "image/png", "Cache-Control": "no-store"},
…lines 14–43 unchanged (30 lines)

After

1<!DOCTYPE html>
2<script src="include.js"></script>
3<script>
4var xhr = new XMLHttpRequest();
5xhr.open("POST", "/echo", false);
6xhr.setRequestHeader("Content-Type", "application/json");
7xhr.send(JSON.stringify({
8 method: "GET",
9 path: "/delayed-green.png",
10 status: 200,
11 headers: {"Content-Type": "image/png", "Cache-Control": "no-store"},
…lines 12–41 unchanged (30 lines)

Before

document
doctype
<! "<!"
doctype "DOCTYPE"
> ">"
script_element
start_tag
< "<"
tag_name "script"
attribute
attribute_name "src"
= "="
quoted_attribute_value
" "\""
attribute_value "include.js"
" "\""
> ">"
raw_text ""
end_tag
</ "</"
tag_name "script"
> ">"
script_element
start_tag
< "<"
tag_name "script"
> ">"
raw_text "\nvar echoPort = internals.getEchoServerPort();\nvar baseURL ="...
end_tag
</ "</"
tag_name "script"
> ">"
style_element
start_tag
< "<"
tag_name "style"
> ">"
raw_text "\n#target {\n width: 100px;\n height: 100px;\n backgrou"...
end_tag
</ "</"
tag_name "style"
> ">"
element
start_tag
< "<"
tag_name "div"
attribute
attribute_name "id"
= "="
quoted_attribute_value
" "\""
attribute_value "target"
" "\""
> ">"
end_tag
</ "</"
tag_name "div"
> ">"
script_element
start_tag
< "<"
tag_name "script"
> ">"
raw_text "\nasyncTest((done) => {\n window.addEventListener(\"load\", ("...
end_tag
</ "</"
tag_name "script"
> ">"

After

document
doctype
<! "<!"
doctype "DOCTYPE"
> ">"
script_element
start_tag
< "<"
tag_name "script"
attribute
attribute_name "src"
= "="
quoted_attribute_value
" "\""
attribute_value "include.js"
" "\""
> ">"
raw_text ""
end_tag
</ "</"
tag_name "script"
> ">"
script_element
start_tag
< "<"
tag_name "script"
> ">"
raw_text "\nvar xhr = new XMLHttpRequest();\nxhr.open(\"POST\", \"/echo\", f"...
end_tag
</ "</"
tag_name "script"
> ">"
style_element
start_tag
< "<"
tag_name "style"
> ">"
raw_text "\n#target {\n width: 100px;\n height: 100px;\n backgrou"...
end_tag
</ "</"
tag_name "style"
> ">"
element
start_tag
< "<"
tag_name "div"
attribute
attribute_name "id"
= "="
quoted_attribute_value
" "\""
attribute_value "target"
" "\""
> ">"
end_tag
</ "</"
tag_name "div"
> ">"
script_element
start_tag
< "<"
tag_name "script"
> ">"
raw_text "\nasyncTest((done) => {\n window.addEventListener(\"load\", ("...
end_tag
</ "</"
tag_name "script"
> ">"