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