Language: JavaScript
Label: safe
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:
(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresponse:",V,"\nresult:",R),this.spinner.stop(),e(R,O,P,N))}),C)}),C,mxUtils.bind(this,function(O){3>n++?t.clear()&&(this.spinner.stop(),p()):C(O)}))}),C);else{var B={message:mxResources.get("error")+" "+G.getStatus()};try{B=JSON.parse(G.getText()),B=B.error}catch(V){}C(B)}}),C)}),k)});p()};EditorUi.prototype.extractMermaidMindmap=function(c){for(0<c[1].indexOf("orientation")&&c.splice(1,1);1<c.length&&""==c[1];)c.splice(1,1);