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:
0;U<A.length;U++){var g=e.view.getState(e.model.getTerminal(A[U],!1));null!=g&&(!N&&Math.min(g.x+g.width,Q.x+Q.width)>=Math.max(g.x,Q.x)||N&&Math.min(g.y+g.height,Q.y+Q.height)>=Math.max(g.y,Q.y))&&L.push(g)}L.sort(function(y,H){return N?y.x+y.width-H.x-H.width:y.y+y.height-H.y-H.height})}return L}function J(A,N){var Q=F(A),L=N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST;(Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST)==L&&Q!=N?c.actions.get("selectParent").funct():Q==
N?(N=e.getOutgoingTreeEdges(A),null!=N&&0<N.length&&e.setSelectionCell(e.model.getTerminal(N[0],!1))):(Q=e.getIncomingTreeEdges(A),null!=Q&&0<Q.length&&(L=S(e.model.getTerminal(Q[0],!0),L,A),A=e.view.getState(A),null!=A&&(A=mxUtils.indexOf(L,A),0<=A&&(A+=N==mxConstants.DIRECTION_NORTH||N==mxConstants.DIRECTION_WEST?-1:1,0<=A&&A<=L.length-1&&e.setSelectionCell(L[A].cell)))))}var c=this,e=c.editor.graph,k=e.getModel(),q=c.menus.createPopupMenu;c.menus.createPopupMenu=function(A,N,Q){q.apply(this,arguments);