Skip to content

Commit

Permalink
Add test to validate escaping of < > [nfarina#29]
Browse files Browse the repository at this point in the history
  • Loading branch information
buholzer committed Apr 27, 2016
1 parent 4d1fde6 commit f9f38d1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/issues.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,12 @@ t.test('parsing comments outside XML scope [#27]', function (t) {
var parsed = new XmlDocument(xmlString);
t.end();
})

t.test('validating escaping of < > [#29]', function (t) {

var xmlString = '<root><command>&lt; &gt;</command></root>';
var parsed = new XmlDocument(xmlString);
var result = parsed.toString({compressed:true})
t.equal(result, xmlString);
t.end();
})

0 comments on commit f9f38d1

Please sign in to comment.