Language: JavaScript
Label: vulnerable
CWE: CWE-78 \u2014 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Code:
q,"\nvalue:",d,"\ntext:",g);return g};EditorUi.prototype.removeMermaidComments=function(d){d=d.split("\n");for(var g=[],n=0;n<d.length;n++)"%%"!=d[n].substring(0,2)&&g.push(d[n]);return g.join("\n")};EditorUi.prototype.generateMermaidImage=function(d,g,n,q,t){d=this.removeMermaidComments(d);var v=mxUtils.bind(this,function(F){this.loadingMermaid=!1;null!=q?q(F):this.handleError(F)}),B=mxUtils.bind(this,function(){try{this.loadingMermaid=!1;g=null!=g?g:mxUtils.clone(EditorUi.defaultMermaidConfig);