replace
document.write(content);
with
MSApp.execUnsafeLocalFunction(function () {
document.write(content);
});
in developement.js or testing.js or production.js which we included in our application will did that trick. Particulary we need create a function() with document.write(content) as statement inside that function then pass that function as argument for MSApp.exeUnsafeLocalFunction() will do that trick.