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:
if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var H=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(P){P=null!=P?P:"";"1"==urlParams.dev&&(P+=(0<P.length?"&":"?")+"dev=1");return H.apply(this,arguments)};var J=f.addClickHandler;f.addClickHandler=function(P,V,l){var B=V;V=function(N,Z){if(null==Z){var U=mxEvent.getSource(N);"a"==U.nodeName.toLowerCase()&&(Z=U.getAttribute("href"))}null!=
Z&&f.isCustomLink(Z)&&(mxEvent.isTouchEvent(N)||!mxEvent.isPopupTrigger(N))&&f.customLinkClicked(Z)&&mxEvent.consume(N);null!=B&&B(N,Z)};J.call(this,P,V,l)};q.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var O=Menus.prototype.addPopupMenuItems;this.menus.addPopupMenuItems=function(P,V,l){f.isSelectionEmpty()&&"simple"==Editor.currentTheme&&this.addMenuItems(P,["zoomIn","zoomOut","-"],null,l);O.apply(this,arguments);