Language: JavaScript
Label: safe
CWE: CWE-79 \u2014 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.

Code:
this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(x);t&&q.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(x);t&&p.apply(this,arguments)});k=k||{};k.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:I});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:k});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,
e){var k=mxUtils.bind(this,function(B,T){var l={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=T?l.error={errResp:T}:null!=B&&(l.resp=B);this.remoteWin.postMessage(JSON.stringify(l),"*")});try{var q=c.funtionName,p=this.remoteInvokableFns[q];if(null!=p&&"function"===typeof this[q]){if(p.allowedDomains){for(var t=!1,x=0;x<p.allowedDomains.length;x++)if(e=="https://"+p.allowedDomains[x]){t=!0;break}if(!t){k(null,"Invalid Call: "+q+" is not allowed.");return}}var C=c.functionArgs;Array.isArray(C)||
(C=[]);if(p.isAsync)C.push(function(){k(Array.prototype.slice.apply(arguments))}),C.push(function(B){k(null,B||"Unkown Error")}),this[q].apply(this,C);else{var I=this[q].apply(this,C);k([I])}}else k(null,"Invalid Call: "+q+" is not found.")}catch(B){k(null,"Invalid Call: An error occurred, "+B.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var k=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=k)try{var q=k.open("database",2);q.onupgradeneeded=