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:
var ErrorDialog=function(b,e,g,n,y,q,E,N,T,F,K){T=null!=T?T:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var W=document.createElement("div");W.style.padding="0px";W.style.margin="0px";W.style.fontSize="18px";W.style.paddingBottom="16px";W.style.marginBottom="10px";W.style.borderBottom="1px solid #c0c0c0";W.style.color="gray";W.style.whiteSpace="nowrap";W.style.textOverflow="ellipsis";W.style.overflow="hidden";mxUtils.write(W,e);W.setAttribute("title",e);R.appendChild(W)}e=
document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";"string"===typeof g&&(g=g.replace(/\n/g,"<br/>"));e.innerHTML=g;R.appendChild(e);g=document.createElement("div");g.style.marginTop="12px";g.style.textAlign="center";null!=q&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();q()}),e.className="geBtn",g.appendChild(e),g.style.textAlign="center");null!=F&&(F=mxUtils.button(F,function(){null!=K&&K()}),F.className="geBtn",g.appendChild(F));var d=mxUtils.button(n,
function(){T&&b.hideDialog();null!=y&&y()});d.className="geBtn";g.appendChild(d);null!=E&&(n=mxUtils.button(E,function(){T&&b.hideDialog();null!=N&&N()}),n.className="geBtn gePrimaryBtn",g.appendChild(n));this.init=function(){d.focus()};R.appendChild(g);this.container=R},PrintDialog=function(b,e){this.create(b,e)};