Skip to content

Commit

Permalink
entity-error test
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoTheissen authored and isaacs committed Sep 26, 2023
1 parent 56084e3 commit 7980d3f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/entity-error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var sax = require('../');
sax.ENTITIES.elem = '<B/>';
require(__dirname).test({
opt: {unparsedEntities: true},
xml: `<A ATTR="&elem;"/>`,
expect: [
["opentagstart", {name: "A", attributes: {}}],
["attribute", {name: 'ATTR', value: "<B/>"}],
["opentag", {name: "A", attributes: {ATTR: "<B/>"}, isSelfClosing: true}],
["closetag", "A"]
]
});

0 comments on commit 7980d3f

Please sign in to comment.