The problem is that scripts are typed text/template are parsed as JavaScript with E4X enabled. Since text/template isn't a JavaScript MIME type, the contents of those script elements shouldn't be passed to the JavaScript engine in the first place.

This is a major web compat bug. It's common to use <script> tags like this for WebGL too, and it's actually possible that some WebGL shader bits can end up looking sorta like JS, I think.
Mark, do you want to take this?

Created attachment 620879[details][diff][review]
Patch (v1) rough
I may have let this fall out while ms2ger and I were working on separate / related bugs ... here's the rough patch ...
Hoping a mochitest like this should suffice ... I've worked mostly in a11y so where would you say to add this test into? My first thought was to clone perhaps: tests/content/base/test/test_bug166235.html ...
<script type="text/template">
is(true, false, "Shouldn't execute");
</script>
<script type="text/javascript">
is(true, true, "Should execute");
</script>

Comment on attachment 620941[details][diff][review]
Patch (v2)
Two things:
1) There are other places in the patch for bug 744332 that had similar issues.
2) I'd structure the test like this:
<script>
var ran = false;
</script>
<script type="text/template">
ran = true;
</script>
<script>
is(ran, false, "text/template script should not run");
</script>
and similar for any other types you want to test.

Created attachment 621003[details][diff][review]
Patch (v3)
Asking for feedback again ... found another block of identical code in nsXULContentSink.cpp that has now been addressed and a test created for.
Again all builds and individually tests ok locally. The whole test-suite runs ok but seems to finish in about half the time it normally takes, though again, its doing this when I pop my change out also.
Let me know if I should push to try, or go for the review? from JST ...

This bug does not affect any of the ringmark tests, but it causes errors in the rng.io test-runner HTML page. I had thought the errors were causing the test runner to fail, but it looks like they are non-fatal, so this probably doesn't need to block.

Since web apps can only be installed on Nightly builds, I tried to verify this issue on Firefox 15.0 Nightly builds:
05/10 Nightly - the issue still reproduces (the push was only made that day, so this is ok)
05/11 Nightly & 05/27 Nightly - the Install button from the web app pages is unresponsive (nothing happens when clicking it & nothing gets displayed in the Error Console).