googlearchive / caja

Caja is a tool for safely embedding third party HTML, CSS and JavaScript in your website.
Apache License 2.0
1.13k stars 127 forks source link

Missing feature in (<div>).innerHTML #1785

Open kpreid opened 9 years ago

kpreid commented 9 years ago

Original issue 1787 created by ihab.awad on 2013-07-03T00:05:23.000Z:

A jQuery test executes:

aDiv.innerHTML = "<script>jQuery.foo='test';</script>";

but this leaves 'aDiv' unmodified. Investigate and figure out why.

kpreid commented 9 years ago

Comment #1 originally posted by ihab.awad on 2013-07-03T00:08:53.000Z:

Verified in the Playground, and also, setting:

aDiv.innerHTML= "

something
";

does the correct thing, so we are just not properly hooking up innerHTML to the parsing and eventual execution of script nodes.

kpreid commented 9 years ago

Comment #2 originally posted by ihab.awad on 2013-07-03T00:12:33.000Z:

Verified in the Playground, and also, setting:

aDiv.innerHTML= "

something
";

does the correct thing, so we are just not properly hooking up innerHTML to the parsing of script nodes.

kpreid commented 9 years ago

Comment #3 originally posted by ihab.awad on 2013-07-03T00:14:25.000Z:

For the purposes of the jQuery tests, creating some Githubissues.

  • Githubissues is a development platform for aggregating issues.