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

Line Feed hex character entity in attributes is missing #189

Open
magraina opened this issue Oct 30, 2024 · 0 comments
Open

Line Feed hex character entity in attributes is missing #189

magraina opened this issue Oct 30, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@magraina
Copy link

Describe the bug
The hex character entity 
 get's converted to a new line character \n.
I did not expect such a conversion and I could not find any config to prevent this behavior.

Input

<?xml version="1.0" encoding="UTF-8"?>
<content>
  <Label text="SUPPLY&#xa;AIR"/>
</content>

Code

const doc = create(xmlInput);
doc.end({ prettyPrint: true });

Output

<?xml version="1.0" encoding="UTF-8"?>
<content>
  <Label text="SUPPLY
AIR"/>
</content>

Expected behavior
I'm expecting that input and output are the same - &#xa; remains and don't get's converted to a new line character.

Version:

  • node.js: [22.8.0]
  • xmlbuilder2 [3.1.1]
@magraina magraina added the bug Something isn't working label Oct 30, 2024
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

2 participants