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:
u))}}finally{n.getModel().endUpdate()}}else{u=n.model.getParent(l);var A=n.getView().scale;d=null;1==n.getSelectionCount()&&n.model.isVertex(l)&&null!=n.layoutManager&&!n.isCellLocked(l)&&(d=n.layoutManager.getLayout(u));if(null!=d&&d.constructor==mxStackLayout)V=u.getIndex(l),37==R||38==R?n.model.add(u,l,Math.max(0,V-1)):(39==R||40==R)&&n.model.add(u,l,Math.min(n.model.getChildCount(u),V+1));else{var B=n.graphHandler;null!=B&&(null==B.first&&B.start(l,0,0,n.getMovableCells(f)),null!=B.first&&(l=
f=0,37==R?f=-V:38==R?l=-V:39==R?f=V:40==R&&(l=V),B.currentDx+=f*A,B.currentDy+=l*A,B.checkPreview(),B.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=B.first){var F=B.roundLength(B.currentDx/A),M=B.roundLength(B.currentDy/A);B.moveCells(B.cells,F,M);B.reset()}},400))}}}}var g=this,n=this.editor.graph,y=new mxKeyHandler(n),q=y.isEventIgnored;y.isEventIgnored=function(R){return!(mxEvent.isShiftDown(R)&&9==R.keyCode)&&(!this.isControlDown(R)||mxEvent.isShiftDown(R)||