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:
0>mxUtils.indexOf(EditorUi.mermaidDiagramTypes,u)&&(f="classDiagram\n"+f);EditorUi.debug("EditorUi.extractMermaidDeclaration","\nlines:",l,"\ntype:",u,"\nvalue:",d,"\ntext:",f);return f};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var f=[],l=0;l<d.length;l++)"%%"!=d[l].substring(0,2)&&f.push(d[l]);return f.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,f,l,u,A){d=this.removeMermaidComments(d);var B=mxUtils.bind(this,function(M){this.loadingMermaid=!1;null!=