Language: JavaScript
Label: safe
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.selectPage=function(b,f,m){try{if(b!=this.currentPage){var d=this.editor.graph;d.isEditing()&&d.stopEditing(!1);f=null!=f?f:!1;d.isMouseDown=!1;d.reset();var u=d.model.createUndoableEdit();u.ignoreEdit=!0;var v=new SelectPage(this,b,m);v.execute();u.add(v);u.notify();d.tooltipHandler.hide();null!=b.viewState&&null==b.viewState.scrollTop&&(d.selectUnlockedLayer(),this.resetScrollbars(),d.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&(d.container.scrollleft=0,
d.container.scrollTop=0,this.chromelessResize()));f||d.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",u))}}catch(D){this.handleError(D)}};EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&null!=this.pages&&(f=mxUtils.indexOf(this.pages,f),b?this.selectPage(this.pages[mxUtils.mod(f+1,this.pages.length)]):b||this.selectPage(this.pages[mxUtils.mod(f-1,this.pages.length)]))};