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;R<F.length;R++){var m=g.view.getState(g.model.getTerminal(F[R],!1));null!=m&&(!O&&Math.min(m.x+m.width,S.x+S.width)>=Math.max(m.x,S.x)||O&&Math.min(m.y+m.height,S.y+S.height)>=Math.max(m.y,S.y))&&K.push(m)}K.sort(function(A,M){return O?A.x+A.width-M.x-M.width:A.y+A.height-M.y-M.height})}return K}function I(F,O){var S=y(F),K=O==mxConstants.DIRECTION_EAST||O==mxConstants.DIRECTION_WEST;(S==mxConstants.DIRECTION_EAST||S==mxConstants.DIRECTION_WEST)==K&&S!=O?d.actions.get("selectParent").funct():S==
O?(O=g.getOutgoingTreeEdges(F),null!=O&&0<O.length&&g.setSelectionCell(g.model.getTerminal(O[0],!1))):(S=g.getIncomingTreeEdges(F),null!=S&&0<S.length&&(K=N(g.model.getTerminal(S[0],!0),K,F),F=g.view.getState(F),null!=F&&(F=mxUtils.indexOf(K,F),0<=F&&(F+=O==mxConstants.DIRECTION_NORTH||O==mxConstants.DIRECTION_WEST?-1:1,0<=F&&F<=K.length-1&&g.setSelectionCell(K[F].cell)))))}var d=this,g=d.editor.graph,n=g.getModel(),t=d.menus.createPopupMenu;d.menus.createPopupMenu=function(F,O,S){t.apply(this,arguments);