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:
mxGraphView.prototype.stateValidated=function(m){null!=m.shape&&this.redrawEnumerationState(m);return S.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(m){m=decodeURIComponent(mxUtils.getValue(m.style,"enumerateValue",""));""==m&&(m=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(m)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(m){var B="1"==mxUtils.getValue(m.style,
"enumerate",0);B&&null==m.secondLabel?(m.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),m.secondLabel.size=12,m.secondLabel.state=m,m.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(m,m.secondLabel)):B||null==m.secondLabel||(m.secondLabel.destroy(),m.secondLabel=null);B=m.secondLabel;if(null!=B){var K=m.view.scale,R=this.createEnumerationValue(m);m=this.graph.model.isVertex(m.cell)?new mxRectangle(m.x+m.width-4*
K,m.y+4*K,0,0):mxRectangle.fromPoint(m.view.getPoint(m));B.bounds.equals(m)&&B.value==R&&B.scale==K||(B.bounds=m,B.value=R,B.scale=K,B.redraw())}};var p=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){p.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var m=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?