Skip to content

Double decode numeric reference #237

Description

@zhangqiujie
test("xmlbuilder2 decodes escaped numeric character references when parsing XML text", () => {
    const doc = create({ skipWhitespaceOnlyText: false }, "<wrapper>&amp;#128512;</wrapper>");
    const textNode = doc.node.documentElement.firstChild;
    assert.equal(textNode.nodeValue, "&#128512;");
});

The test is failed. and the actual output: '😀'

Is this a bug?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions