Language: JavaScript
Label: safe
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
d+(null!=n?"&mime="+n:"")+(null!=t?"&format="+t:"")+(null!=x?"&base64="+x:"")+(null!=g?"&filename="+encodeURIComponent(g):"")+(q?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,g){g=g||"";d=atob(d);for(var n=d.length,q=Math.ceil(n/1024),t=Array(q),x=0;x<q;++x){for(var B=1024*x,G=Math.min(B+1024,n),I=Array(G-B),F=0;B<G;++F,++B)I[F]=d[B].charCodeAt(0);t[x]=new Uint8Array(I)}return new Blob(t,{type:g})};EditorUi.prototype.saveLocalFile=function(d,g,n,q,t,x,B,G){x=null!=x?x:!1;B=null!=B?
B:"vsdx"!=t&&(!mxClient.IS_IOS||!navigator.standalone);var I=mxUtils.bind(this,function(U,R,N,Q){try{if("_blank"==R)if(null!=n&&"image/"==n.substring(0,6))this.openInNewWindow(d,n,q);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 M=window.open("about:blank");null==M?mxUtils.popup(d,!0):(M.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),M.document.close())}else if(R==App.MODE_DEVICE||"download"==
R)this.doSaveLocalFile(d,U,n,q,null,G);else if(null!=U&&0<U.length){var p=mxUtils.bind(this,function(y){try{this.exportFile(d,U,n,q,R,y)}catch(C){this.handleError(C)}});null!=Q?p(Q):this.pickFolder(R,p)}}catch(y){this.handleError(y)}});if("1"==urlParams["save-dialog"])t=[],x||t.push(App.MODE_BROWSER),B||t.push("_blank"),g=new SaveDialog(this,g,mxUtils.bind(this,function(U,R,N){I(U.value,R,U,N);this.hideDialog()}),t,d,n,q),this.showDialog(g.container,420,100,!0,!1,mxUtils.bind(this,function(){this.hideDialog()}));
else{t=this.getServiceCount(x);isLocalStorage&&t++;var F=4>=t?2:6<t?4:3;g=new CreateDialog(this,g,I,mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,x,B,null,1<t,F,d,n,q);x=this.isServices(t)?t>F?390:280:160;this.showDialog(g.container,420,x,!0,!0)}g.init()};EditorUi.prototype.openInNewWindow=function(d,g,n){var q=window.open("about:blank");null==q||null==q.document?mxUtils.popup(d,!0):("image/svg+xml"!=g||mxClient.IS_SVG?"image/svg+xml"!=g||