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:
mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,u,p){var t="0"!=mxUtils.getValue(l.style,"fixedSize","0"),B=t?da.prototype.fixedSize:da.prototype.size;null!=l&&(B=mxUtils.getValue(l.style,"size",B));t&&(B*=l.view.scale);var D=c.x,ha=c.y,I=c.width,ua=c.height,na=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(t=t?Math.max(0,Math.min(I,B)):I*Math.max(0,
Math.min(1,B)),ha=[new mxPoint(D,ha),new mxPoint(D+I-t,ha),new mxPoint(D+I,c),new mxPoint(D+I-t,ha+ua),new mxPoint(D,ha+ua),new mxPoint(D+t,c),new mxPoint(D,ha)]):l==mxConstants.DIRECTION_WEST?(t=t?Math.max(0,Math.min(I,B)):I*Math.max(0,Math.min(1,B)),ha=[new mxPoint(D+t,ha),new mxPoint(D+I,ha),new mxPoint(D+I-t,c),new mxPoint(D+I,ha+ua),new mxPoint(D+t,ha+ua),new mxPoint(D,c),new mxPoint(D+t,ha)]):l==mxConstants.DIRECTION_NORTH?(t=t?Math.max(0,Math.min(ua,B)):ua*Math.max(0,Math.min(1,B)),ha=[new mxPoint(D,
ha+t),new mxPoint(na,ha),new mxPoint(D+I,ha+t),new mxPoint(D+I,ha+ua),new mxPoint(na,ha+ua-t),new mxPoint(D,ha+ua),new mxPoint(D,ha+t)]):(t=t?Math.max(0,Math.min(ua,B)):ua*Math.max(0,Math.min(1,B)),ha=[new mxPoint(D,ha),new mxPoint(na,ha+t),new mxPoint(D+I,ha),new mxPoint(D+I,ha+ua-t),new mxPoint(na,ha+ua),new mxPoint(D,ha+ua-t),new mxPoint(D,ha)]);na=new mxPoint(na,c);p&&(u.x<D||u.x>D+I?na.y=u.y:na.x=u.x);return mxUtils.getPerimeterPoint(ha,na,u)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);