blob: 455fbbd8ca68c30aa19062d6333744dbda4dc05a [file] [log] [blame]
Tests that accessing the innerHTML property of a text node encodes harmful entities which can result in cross site scripting.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS innerHTML("script") is "/*&quot;&apos;&amp;&lt;&gt;&nbsp;&#34;&#39;&#38;&#60;&#62;&#160;\"'&<> */"
PASS innerHTML("style") is "/*&quot;&apos;&amp;&lt;&gt;&nbsp;&#34;&#39;&#38;&#60;&#62;&#160;\"'&<> */"
PASS innerHTML("textarea") is "/*\"'&amp;&lt;&gt;&nbsp;\"'&amp;&lt;&gt;&nbsp;\"'&amp;&lt;&gt; */"
PASS innerHTML("xmp") is "/*&quot;&apos;&amp;&lt;&gt;&nbsp;&#34;&#39;&#38;&#60;&#62;&#160;\"'&<> */"
PASS outerHTML("script") is "<script id=\"script\">/*&quot;&apos;&amp;&lt;&gt;&nbsp;&#34;&#39;&#38;&#60;&#62;&#160;\"'&<> */</script>"
PASS outerHTML("style") is "<style id=\"style\">/*&quot;&apos;&amp;&lt;&gt;&nbsp;&#34;&#39;&#38;&#60;&#62;&#160;\"'&<> */</style>"
PASS outerHTML("textarea") is "<textarea id=\"textarea\">/*\"'&amp;&lt;&gt;&nbsp;\"'&amp;&lt;&gt;&nbsp;\"'&amp;&lt;&gt; */</textarea>"
PASS outerHTML("xmp") is "<xmp id=\"xmp\">/*&quot;&apos;&amp;&lt;&gt;&nbsp;&#34;&#39;&#38;&#60;&#62;&#160;\"'&<> */</xmp>"
PASS successfullyParsed is true
TEST COMPLETE