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:
EditorUi.prototype.getImageForPage=function(b,e,g){g=null!=g?g:this.editor.graph;var p=g.getGlobalVariable,y=this.createTemporaryGraph(g.getStylesheet());y.defaultPageBackgroundColor=g.defaultPageBackgroundColor;y.shapeBackgroundColor=g.shapeBackgroundColor;y.shapeForegroundColor=g.shapeForegroundColor;var q=this.getPageIndex(null!=e?e:this.currentPage);y.getGlobalVariable=function(M){return"pagenumber"==M?q+1:"page"==M&&null!=e?e.getName():p.apply(this,arguments)};document.body.appendChild(y.container);
this.updatePageRoot(b);y.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";g=y.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=y.getGraphBounds();document.body.removeChild(y.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(g)),E.width,E.height,E.x,E.y)};