Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
XMLSerializer.prototype.serializeToString = function(node) {
var text = domToHtml(node);
// Fix a jsdom issue where all SVG tagNames are lowercased:
// https://github.com/tmpvar/jsdom/issues/620
var tagNames = ['linearGradient', 'radialGradient', 'clipPath'];
for (var i = 0, l = tagNames.length; i < l; i++) {
var tagName = tagNames[i];
text = text.replace(
new RegExp('(<|
function getText(element) {
return domToHtml(element._childNodes, true, true);
}
function getText(el) {
return domToHtml(el._childNodes, true, true);
}
get internalText() {
if (!('_text' in this)) {
if (this._parseTree) {
this._text = domtohtml.domToHtml(this._parseTree, !this.isPretty);
} else {
this._text = this._replaceTemplates(this._getTextFromRawSrc());
}
}
return this._text;
},