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:
x.push("page-id="+this.currentPage.getId());return x};EditorUi.prototype.createLink=function(c,e,g,q,p,t,x,B,I,A){I=this.createUrlParameters(c,e,g,q,p,t,I);c=this.getCurrentFile();e=!0;null!=x?g="#U"+encodeURIComponent(x):(c=this.getCurrentFile(),B||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&null!=c&&null!=c.getTitle()&&c.getTitle()!=
this.defaultFilename&&I.push("title="+encodeURIComponent(c.getTitle()));A&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(q&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,q,p,t,x,B,I,A,S,l){this.getBasenames();var n={};""!=p&&p!=mxConstants.NONE&&(n.highlight=p);"auto"!==