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:
F=document.createElement("div");F.style.height="300px";F.style.width="300px";F.style.display="inline-flex";F.style.justifyContent="center";F.style.alignItems="center";F.style.position="absolute";var K=document.createElement("img");K.onload=function(){function B(){G.model.setStyle(c,e+u())}G=new Graph(M);G.autoExtend=!1;G.autoScroll=!1;G.setGridEnabled(!1);G.setEnabled(!0);G.setPanning(!1);G.setConnectable(!1);G.getRubberband().setEnabled(!1);G.graphHandler.allowLivePreview=!1;var T=G.createVertexHandler;
G.createVertexHandler=function(){var P=T.apply(this,arguments);P.livePreview=!1;return P};if(null!=m)try{if("inset"==m.substring(0,5)){var l=c.geometry,n=K.width,z=K.height,E=(300-n)/2,A=(300-z)/2,N=m.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),Q=parseFloat(N[0]),L=parseFloat(N[1]),U=parseFloat(N[2]),g=parseFloat(N[3]);isFinite(Q)&&isFinite(L)&&isFinite(U)&&isFinite(g)?(l.x=g/100*n+E,l.y=Q/100*z+A,l.width=(100-L)/100*n+E-l.x,l.height=(100-U)/100*z+A-l.y,"round"==N[4]?"50%"==N[5]?p.setAttribute("checked",
"checked"):(J=parseInt(N[5]),x.value=J,q.setAttribute("checked","checked"),t.style.visibility="visible"):k.setAttribute("checked","checked")):m=null}else m=null}catch(P){}c.style=e+(m?m:u());c.vertex=!0;G.addCell(c,null,null,null,null);G.selectAll();G.addListener(mxEvent.CELLS_MOVED,B);G.addListener(mxEvent.CELLS_RESIZED,B);var y=G.graphHandler.mouseUp,H=G.graphHandler.mouseDown;G.graphHandler.mouseUp=function(){y.apply(this,arguments);M.style.backgroundColor="#fff9"};G.graphHandler.mouseDown=function(){H.apply(this,
arguments);M.style.backgroundColor=""};G.dblClick=function(){};var O=G.getSelectionModel().changeSelection;G.getSelectionModel().changeSelection=function(){O.call(this,[c],[c])}};K.onerror=function(){K.onload=null;K.src=Editor.errorImage};K.setAttribute("src",f);K.style.maxWidth="300px";K.style.maxHeight="300px";F.appendChild(K);D.appendChild(F);var M=document.createElement("div");M.style.width="300px";M.style.height="300px";M.style.overflow="hidden";M.style.backgroundColor="#fff9";D.appendChild(M);