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

Carriage return is stripped in client parser #420

Open
remarkablemark opened this issue Mar 10, 2023 · 1 comment
Open

Carriage return is stripped in client parser #420

remarkablemark opened this issue Mar 10, 2023 · 1 comment
Assignees
Labels

Comments

@remarkablemark
Copy link
Owner

remarkablemark commented Mar 10, 2023

Expected Behavior

Carriage return preserved in client parser:

import parse from 'html-dom-parser';

parse('\r\n'); // '\r\n'

Actual Behavior

Carriage return stripped in client parser:

import parse from 'html-dom-parser';

parse('\r\n'); // '\n'

Steps to Reproduce

See above

Reproducible Demo

https://jsfiddle.net/remarkablemark/a8zqgp4s/

Environment

  • Version: 3.1.5
  • Platform: Browser
  • Browser: Chrome
  • OS:

Keywords

carriage return, newline, client parser, innerHTML

@remarkablemark remarkablemark self-assigned this Mar 10, 2023
@remarkablemark
Copy link
Owner Author

Relates to remarkablemark/html-react-parser#864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant