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(M){x=null!=x?x:"pdf"==g?"application/pdf":"image/"+g;if(null!=q)try{this.exportFile(q,U,x,!0,R,M)}catch(p){this.handleError(p)}else this.spinner.spin(document.body,mxResources.get("saving"))&&P.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=P.getStatus()&&299>=P.getStatus())try{this.exportFile(P.getText(),U,x,!0,R,M)}catch(p){this.handleError(p)}else this.handleError({message:mxResources.get("errorSavingFile")})}),mxUtils.bind(this,function(p){this.spinner.stop();this.handleError(p)}))}),