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:
m.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(R)?"chrome-extension://"==R.substring(0,19)||mxClient.IS_CHROMEAPP||(R=B.apply(this,arguments)):R=PROXY_URL+"?url="+encodeURIComponent(R)}return R};return m};Editor.createSvgDataUri=function(m){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(m)))};Editor.prototype.convertImageToDataUri=function(m,B){try{var K=!0,R=window.setTimeout(mxUtils.bind(this,function(){K=!1;B(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(m))mxUtils.get(m,
mxUtils.bind(this,function(W){window.clearTimeout(R);K&&B(Editor.createSvgDataUri(W.getText()))}),function(){window.clearTimeout(R);K&&B(Editor.svgBrokenImage.src)});else{var U=new Image;this.crossOriginImages&&(U.crossOrigin="anonymous");U.onload=function(){window.clearTimeout(R);if(K)try{var W=document.createElement("canvas"),Q=W.getContext("2d");W.height=U.height;W.width=U.width;Q.drawImage(U,0,0);B(W.toDataURL())}catch(V){B(Editor.svgBrokenImage.src)}};U.onerror=function(){window.clearTimeout(R);
K&&B(Editor.svgBrokenImage.src)};U.src=m}}catch(W){B(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(m,B,K,R){null==R&&(R=this.createImageUrlConverter());var U=0,W=K||{};K=mxUtils.bind(this,function(Q,V){Q=m.getElementsByTagName(Q);for(var X=0;X<Q.length;X++)mxUtils.bind(this,function(Y){try{if(null!=Y){var Z=R.convert(Y.getAttribute(V));if(null!=Z&&"data:"!=Z.substring(0,5)){var ca=W[Z];null==ca?(U++,this.convertImageToDataUri(Z,function(da){null!=da&&(W[Z]=da,Y.setAttribute(V,