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:
E.style.backgroundPosition=d,E.style.backgroundImage=V,!R||null!=G.background&&G.background!=mxConstants.NONE?E.style.backgroundColor=L:(E.style.backgroundColor=G.diagramBackgroundColor,G.container.style.backgroundColor=""))};mxGraphView.prototype.createSvgGrid=function(E,K){for(K=this.graph.gridSize*this.scale*(null!=K?K:1);K<this.minGridSize;)K*=2;for(var S=this.gridSteps*K,G=[],L=1;L<this.gridSteps;L++){var R=L*K;G.push("M 0 "+R+" L "+S+" "+R+" M "+R+" 0 L "+R+" "+S)}return'<svg width="'+S+'" height="'+
S+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+S+'" height="'+S+'" patternUnits="userSpaceOnUse"><path d="'+G.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+S+" 0 L 0 0 0 "+S+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,K){b.apply(this,arguments);if(null!=this.shiftPreview1){var S=this.view.canvas;