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:
                function addEdgeSublabel(graph, edge, edgeShape, rotation, lblOffset)
                {
                    var label = edgeShape.createLabelSubShape(graph, edge);

                    if (label != null)
                    {
                        if (rotation !== 0) 
                        {
                            var lblRot = label.getStyle().match(/;rotation=(\d+\.*\d+)/);
                            
                            if (lblRot != null)
                            {
                                rotation += parseFloat(lblRot[1]);
                            }

                            label.setStyle(label.getStyle().replace(/;rotation=(\d+\.*\d+)/, '') + ";rotation=" + (rotation > 60 && rotation < 240 ? (rotation + 180) % 360 : rotation));
                        }

                        var geo = label.getGeometry();
                        geo.x = (0);
                        geo.y = (0);
                        geo.relative = (true);
                        lblOffset = lblOffset || new mxPoint(0, 0);
                        geo.offset = (new mxPoint(lblOffset.x - geo.width / 2, lblOffset.y - geo.height / 2));
                    }
                };