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:",d,"\nresponse:",U,"\nresult:",R),this.spinner.stop(),g(R,N,Q,P))}),G)}),G,mxUtils.bind(this,function(N){3>q++?x.clear()&&(this.spinner.stop(),t()):G(N)}))}),G);else{var F={message:mxResources.get("error")+" "+I.getStatus()};try{F=JSON.parse(I.getText()),F=F.error}catch(U){}G(F)}}),G)}),n)});t()};EditorUi.prototype.extractMermaidMindmap=function(d){for(0<d[1].indexOf("orientation")&&d.splice(1,1);1<d.length&&""==d[1];)d.splice(1,1);