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:
Editor.createRoughCanvas=function(m){var B=rough.canvas({getContext:function(){return m}});B.draw=function(K){var R=K.sets||[];K=K.options||this.getDefaultOptions();for(var U=0;U<R.length;U++){var W=R[U];switch(W.type){case "path":null!=K.stroke&&this._drawToContext(m,W,K);break;case "fillPath":this._drawToContext(m,W,K);break;case "fillSketch":this.fillSketch(m,W,K)}}};B.fillSketch=function(K,R,U){var W=m.state.strokeColor,Q=m.state.strokeWidth,V=m.state.strokeAlpha,X=m.state.dashed,Y=U.fillWeight;
0>Y&&(Y=U.strokeWidth/2);m.setStrokeAlpha(m.state.fillAlpha);m.setStrokeColor(U.fill||"");m.setStrokeWidth(Y);m.setDashed(!1);this._drawToContext(K,R,U);m.setDashed(X);m.setStrokeWidth(Q);m.setStrokeColor(W);m.setStrokeAlpha(V)};B._drawToContext=function(K,R,U){K.begin();for(var W=0;W<R.ops.length;W++){var Q=R.ops[W],V=Q.data;switch(Q.op){case "move":K.moveTo(V[0],V[1]);break;case "bcurveTo":K.curveTo(V[0],V[1],V[2],V[3],V[4],V[5]);break;case "lineTo":K.lineTo(V[0],V[1])}}K.end();"fillPath"===R.type&&
U.filled?K.fill():K.stroke()};return B};(function(){function m(W,Q,V){this.canvas=W;this.rc=Q;this.shape=V;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,m.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,m.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,m.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=