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