Language: JavaScript
Label: safe
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:
else if("svg"==k)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(O.getSvg(v,z,A)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),ja=O.getGraphBounds(),fa=Math.floor(ja.width*z/O.view.scale),ca=Math.floor(ja.height*z/O.view.scale);if(G.length<=MAX_REQUEST_SIZE&&fa*ca<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var ia={globalVars:O.getExportVariables()};J&&(ia.grid={size:O.gridSize,steps:O.view.gridSteps,color:O.view.gridColor});d.saveRequest(f,
k,function(ma,ba){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(ba||"0")+(null!=ma?"&filename="+encodeURIComponent(ma):"")+"&extras="+encodeURIComponent(JSON.stringify(ia))+(0<H?"&dpi="+H:"")+"&bg="+(null!=v?v:"none")+"&w="+fa+"&h="+ca+"&border="+A+"&xml="+encodeURIComponent(G))})}else"png"==k?d.exportImage(z,null==v||"none"==v,!0,!1,!1,A,!0,!1,null,J,H):d.exportImage(z,!1,!0,!1,!1,A,!0,!1,"jpeg",J);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=