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