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:
n&&v.setAttribute("resource",n);var C=mxUtils.bind(this,function(J){J=(t?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(J);null!=u&&u(J);return J});g.mathEnabled&&this.editor.addMathCss(v);if(null!=u)this.embedFonts(v,mxUtils.bind(this,function(J){H?this.editor.convertImages(J,mxUtils.bind(this,function(F){C(F)})):C(J)}));else return C(v)};EditorUi.prototype.embedFonts=function(d,g){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
this.editor.addFontCss(d,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(n){try{null!=n&&this.editor.addFontCss(d,n),g(d)}catch(t){g(d)}}))}catch(n){g(d)}}))};EditorUi.prototype.exportImage=function(d,g,n,t,u,v,B,H,L,G,T,p,q){L=null!=L?L:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var C=this.editor.graph.isSelectionEmpty();n=null!=n?n:C;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,