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*t,B=Math.min(x+1024,g),I=Array(B-x),A=0;x<B;++A,++x)I[A]=c[x].charCodeAt(0);p[t]=new Uint8Array(I)}return new Blob(p,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,q,p,t,x,B){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(A,S){try{if("_blank"==S)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,q);else if(null!=g&&"text/html"==
g.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 S==App.MODE_DEVICE||"download"==S?this.doSaveLocalFile(c,A,g,q,null,B):null!=A&&0<A.length&&this.pickFolder(S,mxUtils.bind(this,function(z){try{this.exportFile(c,A,g,q,S,z)}catch(C){this.handleError(C)}}))}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,g,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,g){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||g?(c=g?c:btoa(unescape(encodeURIComponent(c))),q.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+