Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML Entities are unescaped when creating using json object #115

Closed
chris-rudmin opened this issue Dec 21, 2021 · 1 comment
Closed

HTML Entities are unescaped when creating using json object #115

chris-rudmin opened this issue Dec 21, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@chris-rudmin
Copy link

Describe the bug
HTML Entities are unescaped when creating xml using a json object

To Reproduce

create().ele({
    'foo': ''"©℗™'
}).end()

// <?xml version="1.0"?><foo>'"©℗™</foo>
create().ele('foo').txt('&apos;&quot;&#xA9;&#x2117;&#x2122;').end()
// <?xml version="1.0"?><foo>&apos;&quot;&#xA9;&#x2117;&#x2122;</foo>

Expected behavior
text should remain as it was input and should be consistent with the chained builder

Version:

  • node.js: [14.18.1]
  • xmlbuilder2 [3.0.2]

Additional context

@chris-rudmin chris-rudmin added the bug Something isn't working label Dec 21, 2021
@universalhandle
Copy link
Collaborator

This looks like a duplicate of various issues that have been opened related to ampersand encoding (see #105, #109, #110). I believe this to be fixed with the release of v3.1.0. Please reopen if you can still reproduce after upgrading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants