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.prototype.generatePlantUmlImage=function(d,f,k,u){function z(K,N,H){c1=K>>2;c2=(K&3)<<4|N>>4;c3=(N&15)<<2|H>>6;c4=H&63;r="";r+=B(c1&63);r+=B(c2&63);r+=B(c3&63);return r+=B(c4&63)}function B(K){if(10>K)return String.fromCharCode(48+K);K-=10;if(26>K)return String.fromCharCode(65+K);K-=26;if(26>K)return String.fromCharCode(97+K);K-=26;return 0==K?"-":1==K?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":PLANT_URL+"/svg/")+function(K){r="";
for(i=0;i<K.length;i+=3)r=i+2==K.length?r+z(K.charCodeAt(i),K.charCodeAt(i+1),0):i+1==K.length?r+z(K.charCodeAt(i),0,0):r+z(K.charCodeAt(i),K.charCodeAt(i+1),K.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(K){if(200<=this.status&&300>this.status)if("txt"==f)k(this.response);else{var N=new FileReader;N.readAsDataURL(this.response);N.onloadend=function(H){var ka=new Image;ka.onload=function(){try{var ea=ka.width,ca=
ka.height;if(0==ea&&0==ca){var ja=N.result,ma=ja.indexOf(","),Z=decodeURIComponent(escape(atob(ja.substring(ma+1)))),S=mxUtils.parseXml(Z).getElementsByTagName("svg");0<S.length&&(ea=parseFloat(S[0].getAttribute("width")),ca=parseFloat(S[0].getAttribute("height")))}k(N.result,ea,ca)}catch(da){u(da)}};ka.src=N.result};N.onerror=function(H){u(H)}}else u(K)};F.onerror=function(K){u(K)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,k){var u=this.editor.graph,z=null;u.getModel().beginUpdate();