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:
function(d,f){var k=0,v=new mxGraphModel,z=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var A=0;A<d.length;A++){this.updatePageRoot(d[A]);var H=d[A].node.cloneNode(!1);H.removeAttribute("name");v.root=d[A].root;var J=z.encode(v);this.editor.graph.saveViewState(d[A].viewState,J,!0);J.removeAttribute("pageWidth");J.removeAttribute("pageHeight");H.appendChild(J);null!=f&&(f.eltCount+=H.getElementsByTagName("*").length,f.nodeCount+=H.getElementsByTagName("mxCell").length);
k=(k<<5)-k+this.hashValue(H,function(O,G,ja,fa){return!fa||"mxGeometry"!=O.nodeName&&"mxPoint"!=O.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?fa&&"mxCell"==O.nodeName&&"previous"==G?null:ja:Math.round(ja)},f)<<0}return k};EditorUi.prototype.hashValue=function(d,f,k){var v=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(v^=this.hashValue(d.nodeName,f,k));if(null!=d.attributes){null!=k&&(k.attrCount+=