Language: JavaScript
Label: vulnerable
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(A+1024,n),L=Array(H-A),F=0;A<H;++F,++A)L[F]=d[A].charCodeAt(0);u[v]=new Uint8Array(L)}return new Blob(u,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,n,t,u,v,A,H){v=null!=v?v:!1;A=null!=A?A:"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(F,S){try{if("_blank"==S)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 S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(d,F,n,t,null,H):null!=F&&0<F.length&&this.pickFolder(S,mxUtils.bind(this,function(C){try{this.exportFile(d,F,n,t,S,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,A,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,"+