Skip to content

Parser completely removes body elements if html string has open <html> and <body> tags, but does not have close </body> and </html> tags #126

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

Closed
sanex3339 opened this issue Oct 28, 2019 · 2 comments

Comments

@sanex3339
Copy link

Expected Behavior

Parser should try to keep all existing html tags if html string has open and tags, but does not have close and tags

Actual Behavior

Parser completely removes all body elements if html string has open and tags, but does not have close and tags

Steps to Reproduce

Just try to parse following html string:

 <html>
        <body>
          <h1 style="font-family: Arial;">
            html-react-parser
          </h1>

Reproducible Demo

https://jsfiddle.net/rxzudvmf/

Environment

  • Version: 0.9.1
  • Platform: Mac OS
  • Browser: Chrome 77
@sanex3339
Copy link
Author

Looks like a problem of html-dom-parser

@remarkablemark
Copy link
Owner

[email protected] has been released and published:

# update with npm
npm i -S [email protected]

# or with yarn
yarn add [email protected]

Let me know if this resolves the issue for you @sanex3339.

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

No branches or pull requests

2 participants