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