Since it sounded like jQuery was an option for Metro JavaScript apps, I was starting to look forward to Windows 8 dev. I installed Visual Studio 2012 Express RC and started
I was able to eliminate the problem by finding all places in jQuery that set innerHTML and wrapping the value being set with toStaticHTML().
So, for example:
div.innerHTML = "
a";
became:
div.innerHTML = toStaticHTML("
a");
To be safe, I've also defined this just before jQuery is defined, in case the file is used in a normal browser:
window.toStaticHTML = window.toStaticHTML || function (s) { return s; };
To me that seemed to be the safest change, although it required patching a dozen places in jQuery. (don't use a var statement before the toStaticHTML)