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 c=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(l){var n=c.apply(this,arguments);if(("1"!=urlParams.embed||"1"==urlParams.atlas)&&null!=n&&Editor.enableSimpleTheme&&"atlassian"!=d.getServiceName()){var z=this.get("appearance");if(null!=z){var C=n.addMenu("",z.funct);C.setAttribute("title",mxResources.get("appearance"));C.className="geToolbarButton geAdaptiveAsset";C.style.backgroundPosition="center center";C.style.backgroundRepeat="no-repeat";C.style.backgroundSize="100% 100%";
C.style.display="inline-block";C.style.cursor="pointer";C.style.zIndex="1";C.style.position="absolute";C.style.height="18px";C.style.width="18px";"atlas"==Editor.currentTheme?(C.style.filter="invert(100%)",C.style.right="11px",C.style.top="10px"):(C.style.right="10px",C.style.top="5px");document.body.appendChild(C);n.langIcon=C;z=mxUtils.bind(this,function(){var D=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;C.style.display="atlas"==Editor.currentTheme||"min"==
Editor.currentTheme||"sketch"==Editor.currentTheme?"none":"";C.style.backgroundImage="simple"==Editor.currentTheme?750>D?"url("+Editor.thinDoubleArrowRightImage+")":"url("+(Editor.isDarkMode()?Editor.thinDarkImage:Editor.thinLightImage)+")":"url("+(Editor.isDarkMode()?Editor.darkModeImage:Editor.lightModeImage)+")"});this.editorUi.addListener("currentThemeChanged",z);this.editorUi.addListener("darkModeChanged",z);mxEvent.addListener(window,"resize",z);z()}}return n}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",