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:
1024*t,C=Math.min(x+1024,k),I=Array(C-x),B=0;x<C;++B,++x)I[B]=c[x].charCodeAt(0);p[t]=new Uint8Array(I)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,k,q,p,t,x,C){t=null!=t?t:!1;x=null!=x?x:"vsdx"!=p&&(!mxClient.IS_IOS||!navigator.standalone);p=this.getServiceCount(t);isLocalStorage&&p++;var I=4>=p?2:6<p?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(B,T){try{if("_blank"==T)if(null!=k&&"image/"==k.substring(0,6))this.openInNewWindow(c,k,q);else if(null!=k&&"text/html"==
k.substring(0,9)){var l=new EmbedDialog(this,c);this.showDialog(l.container,450,240,!0,!0);l.init()}else{var n=window.open("about:blank");null==n?mxUtils.popup(c,!0):(n.document.write("<pre>"+mxUtils.htmlEntities(c,!1)+"</pre>"),n.document.close())}else T==App.MODE_DEVICE||"download"==T?this.doSaveLocalFile(c,B,k,q,null,C):null!=B&&0<B.length&&this.pickFolder(T,mxUtils.bind(this,function(z){try{this.exportFile(c,B,k,q,T,z)}catch(E){this.handleError(E)}}))}catch(z){this.handleError(z)}}),mxUtils.bind(this,
function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,t,x,null,1<p,I,c,k,q);t=this.isServices(p)?p>I?390:280:160;this.showDialog(e.container,420,t,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=function(c,e,k){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"!=e||k?(c=k?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+