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