Language: JavaScript
Label: safe
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:
(EditorUi.debug("EditorUi.generateOpenAiMermaidDiagram","\nprompt:",c,"\nresponse:",T,"\nresult:",l),this.spinner.stop(),e(l,n,z,E))}),C)}),C,mxUtils.bind(this,function(n){3>q++?t.clear()&&(this.spinner.stop(),p()):C(n)}))}),C);else{var B={message:mxResources.get("error")+" "+I.getStatus()};try{B=JSON.parse(I.getText()),B=B.error}catch(T){}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);