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:
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,e=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var E=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";E!=this.tabContainer.style.height&&this.refresh(!1)}e.apply(b.view,arguments)});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(E,K){E=K.getProperty("edit").changes;for(K=0;K<E.length;K++)if(E[K]instanceof RenamePage||E[K]instanceof MovePage||E[K]instanceof mxRootChange){this.updateTabContainer();
break}}));var g=b.sizeDidChange,n=null,y=this;b.sizeDidChange=function(){var E=g.apply(this,arguments);null!=y.currentPage&&n!=y.currentPage&&(n=y.currentPage,y.pageSelected());return E};var q=mxUtils.bind(this,function(){this.updateDocumentTitle();this.updateTabContainer()});this.addListener("currentThemeChanged",q);this.editor.addListener("pagesPatched",q);this.editor.addListener("pageRenamed",q);this.editor.addListener("pageMoved",q);this.editor.addListener("fileLoaded",q);this.editor.addListener("pageSelected",
mxUtils.bind(this,function(E,K){this.scrollToPage();this.updateHashObject();this.updateTabContainer();this.updateDocumentTitle();null!=this.toolbar&&this.toolbar.updateZoom()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(E,K){this.scrollToPage();this.updateHashObject()}));mxEvent.addListener(window,"resize",mxUtils.bind(this,function(){this.checkTabScrollerOverflow()}))}};