Language: JavaScript
Label: vulnerable
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:
g&&t.setAttribute("resource",g);var z=mxUtils.bind(this,function(C){C=(q?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(C);null!=p&&p(C);return C});e.mathEnabled&&this.editor.addMathCss(t);if(null!=p)this.embedFonts(t,mxUtils.bind(this,function(C){B?this.editor.convertImages(C,mxUtils.bind(this,function(D){z(D)})):z(C)}));else return z(t)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&
this.editor.addFontCss(c,this.editor.resolvedFontCss),this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(q){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,q,p,t,x,B,I,A,S,l,n){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var z=this.editor.graph.isSelectionEmpty();g=null!=g?g:z;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,