1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/Strict.dtd">
2 <html xml:
lang=
"en" lang=
"en" xmlns=
"http://www.w3.org/1999/xhtml">
4 <title>XHTML innerHTML null byte test
</title>
7 testRunner
.dumpAsText();
11 <p id=
"p0">FAIL: No exception raised.
</p>
14 document
.getElementById("p0").innerHTML
= "FAIL: Nulls mishandled.\x00";
16 document
.getElementById("p0").innerHTML
= "PASS: An exception was raised, no crashing.";
17 if (e
.code
!= DOMException
.SYNTAX_ERR
)
18 console
.log("Unexpected error thrown: " + e
.name
+ ": " + e
.message
);