Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

Commit e5230ad

Browse files
committed
Address review comment from c4milo
1 parent 1f9fdc5 commit e5230ad

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/json2xml.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ ToXml.prototype.addAttr = function(key, val) {
8282
}
8383
ToXml.prototype.addTextContent = function(text) {
8484
this.completeTag();
85-
this.xml += (this.options.sanitize ? sanitizer.sanitize(text) : text);
85+
var newText = (this.options.sanitize ? sanitizer.sanitize(text) : text);
86+
this.xml += newText;
8687
}
8788
ToXml.prototype.closeTag = function(key) {
8889
this.completeTag();

0 commit comments

Comments
 (0)