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:
function(H){t=null!=t?t:"pdf"==e?"application/pdf":"image/"+e;if(null!=n)try{this.exportFile(n,V,t,!0,R,H)}catch(m){this.handleError(m)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),V,t,!0,R,H)}catch(m){this.handleError(m)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}))}),