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:
Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(k){return k.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(k){return Graph.isGoogleFontUrl(k)};Graph.createFontElement=function(k,y){var G=Graph.fontMapping[y];null==G&&Graph.isCssFontUrl(y)?(k=document.createElement("link"),k.setAttribute("rel","stylesheet"),k.setAttribute("type","text/css"),k.setAttribute("charset","UTF-8"),k.setAttribute("href",y)):(null==G&&(G='@font-face {\nfont-family: "'+
k+'";\nsrc: url("'+y+'");\n}'),k=document.createElement("style"),mxUtils.write(k,G));return k};Graph.addFont=function(k,y,G){if(null!=k&&0<k.length&&null!=y&&0<y.length){var P=k.toLowerCase();if("helvetica"!=P&&"arial"!=k&&"sans-serif"!=P){var Q=Graph.customFontElements[P];null!=Q&&Q.url!=y&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=y,"http:"==y.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(y)),Q={name:k,url:y,elt:Graph.createFontElement(k,Q)},Graph.customFontElements[P]=Q,