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,K,S,G,L){S=null!=S?S:!0;var R=document.createElement("div");R.style.textAlign="center";if(null!=e){var V=document.createElement("div");V.style.padding="0px";V.style.margin="0px";V.style.fontSize="18px";V.style.paddingBottom="16px";V.style.marginBottom="10px";V.style.borderBottom="1px solid #c0c0c0";V.style.color="gray";V.style.whiteSpace="nowrap";V.style.textOverflow="ellipsis";V.style.overflow="hidden";mxUtils.write(V,e);V.setAttribute("title",e);R.appendChild(V)}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!=G&&(G=mxUtils.button(G,function(){null!=L&&L()}),G.className="geBtn",g.appendChild(G));var d=mxUtils.button(n,
function(){S&&b.hideDialog();null!=y&&y()});d.className="geBtn";g.appendChild(d);null!=E&&(n=mxUtils.button(E,function(){S&&b.hideDialog();null!=K&&K()}),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)};