I encountered, that the JavaScript code
!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');
was breaking my pages on the CMS level after updating to 1.0.12. I do not know if this is a MODx issue, or if this has to do with snippets or pug-ins I run. However, I fixed it this way:
1. I created a blank HTML document outside of MODx, where I encoded the JavaScroipt using
escape("!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');")
2. Then I embedded the generated code, unescaped it and executed it
eval(unescape("HEREGOESTHEESCAPEDCODE'));