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:
(k[y]=Graph.fontMapping[y]);return k};Editor.prototype.embedExtFonts=function(k){var y=this.graph.getCustomFonts();if(0<y.length){var G=[],P=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==P&&this.embedCssFonts(G.join(""),k)}),U=0;U<y.length;U++)mxUtils.bind(this,function(T,W){Graph.isCssFontUrl(W)?null==this.cachedGoogleFonts[W]?(P++,this.loadUrl(W,mxUtils.bind(this,function(X){this.cachedGoogleFonts[W]=X;G.push(X+"\n");
P--;Q()}),mxUtils.bind(this,function(X){P--;G.push("@import url("+W+");\n");Q()}))):G.push(this.cachedGoogleFonts[W]+"\n"):G.push('@font-face {font-family: "'+T+'";src: url("'+W+'")}\n')})(y[U].name,y[U].url);Q()}else k()};Editor.prototype.addMathCss=function(k){k=k.getElementsByTagName("defs");if(null!=k&&0<k.length)for(var y=document.getElementsByTagName("style"),G=0;G<y.length;G++){var P=mxUtils.getTextContent(y[G]);0>P.indexOf("mxPageSelector")&&0<P.indexOf("MathJax")&&k[0].appendChild(y[G].cloneNode(!0))}};