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:
Graph.prototype.createLayersDialog=function(b,e){var g=document.createElement("div");g.style.position="absolute";for(var p=this.getModel(),y=p.getChildCount(p.root),q=0;q<y;q++)mxUtils.bind(this,function(E){function M(){p.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(p.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(){p.setVisible(E,!p.isVisible(E));M();null!=b&&b(E)});M()})(p.getChildAt(p.root,q));return g};