diff --git a/lib/reporters/xunit.js b/lib/reporters/xunit.js index 875d592876..1cfd8f4f51 100644 --- a/lib/reporters/xunit.js +++ b/lib/reporters/xunit.js @@ -130,7 +130,7 @@ XUnit.prototype.test = function(test) { if (test.state === 'failed') { var err = test.err; - this.write(tag('testcase', attrs, false, tag('failure', {}, false, cdata(escape(err.message) + '\n' + err.stack)))); + this.write(tag('testcase', attrs, false, tag('failure', {}, false, escape(err.message) + '\n' + escape(err.stack)))); } else if (test.isPending()) { this.write(tag('testcase', attrs, false, tag('skipped', {}, true))); } else { @@ -164,11 +164,3 @@ function tag(name, attrs, close, content) { } return tag; } - -/** - * Return cdata escaped CDATA `str`. - */ - -function cdata(str) { - return ''; -}