Language: JavaScript
Label: vulnerable
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:
for(i=0;i<M.length;i+=3)r=i+2==M.length?r+A(M.charCodeAt(i),M.charCodeAt(i+1),0):i+1==M.length?r+A(M.charCodeAt(i),0,0):r+A(M.charCodeAt(i),M.charCodeAt(i+1),M.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(M){if(200<=this.status&&300>this.status)if("txt"==f)l(this.response);else{var O=new FileReader;O.readAsDataURL(this.response);O.onloadend=function(H){var ja=new Image;ja.onload=function(){try{var da=ja.width,ca=
ja.height;if(0==da&&0==ca){var ia=O.result,ma=ia.indexOf(","),aa=decodeURIComponent(escape(atob(ia.substring(ma+1)))),la=mxUtils.parseXml(aa).getElementsByTagName("svg");0<la.length&&(da=parseFloat(la[0].getAttribute("width")),ca=parseFloat(la[0].getAttribute("height")))}l(O.result,da,ca)}catch(X){u(X)}};ja.src=O.result};O.onerror=function(H){u(H)}}else u(M)};F.onerror=function(M){u(M)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,l){var u=this.editor.graph,A=null;u.getModel().beginUpdate();