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.createUrlParameters=function(c,e,k,q,p,t,x){x=null!=x?x:[];q&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||x.push("lightbox=1"),"auto"!=c&&x.push("target="+c),null!=e&&e!=mxConstants.NONE&&x.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=p&&0<p.length&&x.push("edit="+encodeURIComponent(p)),t&&x.push("layers=1"),this.editor.graph.foldingEnabled&&x.push("nav=1"));k&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&
x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(c,e,k,q,p,t,x,C,I,B){I=this.createUrlParameters(c,e,k,q,p,t,I);c=this.getCurrentFile();e=!0;null!=x?k="#U"+encodeURIComponent(x):(c=this.getCurrentFile(),C||null==c||c.constructor!=window.DriveFile?k="#R"+encodeURIComponent(k?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(k="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=