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)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(I.getSvg(q,p,t)),"image/svg+xml");else{var B=c.getFileData(!0,null,null,null,null,!0),T=I.getGraphBounds(),l=Math.floor(T.width*p/I.view.scale),n=Math.floor(T.height*p/I.view.scale);if(B.length<=MAX_REQUEST_SIZE&&l*n<MAX_AREA)if(c.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!c.isExportToCanvas()){var z={globalVars:I.getExportVariables()};C&&(z.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});c.saveRequest(e,k,function(E,
A){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(A||"0")+(null!=E?"&filename="+encodeURIComponent(E):"")+"&extras="+encodeURIComponent(JSON.stringify(z))+(0<x?"&dpi="+x:"")+"&bg="+(null!=q?q:"none")+"&w="+l+"&h="+n+"&border="+t+"&xml="+encodeURIComponent(B))})}else"png"==k?c.exportImage(p,null==q||"none"==q,!0,!1,!1,t,!0,!1,null,C,x):c.exportImage(p,!1,!0,!1,!1,t,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);