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:
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var n=this.getModel(),y=n.getChildCount(n.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function N(){n.isVisible(E)?(K.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(F,75)):(K.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(F,25))}var T=this.convertValueToString(E)||mxResources.get("background")||"Background",F=document.createElement("div");F.style.overflow=
"hidden";F.style.textOverflow="ellipsis";F.style.padding="2px";F.style.whiteSpace="nowrap";F.style.cursor="pointer";F.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[T]));var K=document.createElement("img");K.setAttribute("draggable","false");K.setAttribute("align","absmiddle");K.setAttribute("border","0");K.style.position="relative";K.style.width="16px";K.style.padding="0px 6px 0 4px";e&&(K.style.filter="invert(100%)",K.style.top="-2px");F.appendChild(K);mxUtils.write(F,T);g.appendChild(F);
mxEvent.addListener(F,"click",function(){n.setVisible(E,!n.isVisible(E));N();null!=b&&b(E)});N()})(n.getChildAt(n.root,q));return g};