1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Block loading ACE from cdn

This commit is contained in:
Nick O'Leary 2019-03-18 10:55:12 +00:00
parent d59bf84470
commit a242475b38
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -46,6 +46,14 @@ var RED = (function() {
newScript.src = RED.settings.apiRootUrl+srcUrl;
hasDeferred = true;
} else {
if (/\/ace.js$/.test(srcUrl) || /\/ext-language_tools.js$/.test(srcUrl)) {
// Block any attempts to load ace.js from a CDN - this will
// break the version of ace included in the editor.
// At the time of commit, the contrib-python nodes did this.
// This is a crude fix until the python nodes are fixed.
console.warn("Blocked attempt to load",srcUrl,"by",moduleId)
$(el).remove();
}
scriptCount--;
}
})