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

Closed
@sanex3339

Description

@sanex3339

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions