Skip to content

<body> tag with newline symbols doesn't get parsed #624

@Dremora

Description

@Dremora

Expected Behavior

"<body \n>hello</body>" gets parsed as it is. I've checked W3C HTML validator, and this is valid HTML. Strangely enough, the bug only applies to <body>.

Actual Behavior

No body is returned.

Steps to Reproduce

Try parsing the following string:

  <!DOCTYPE html>
  <html>
    <head>
      <title>Working</title>
    </head>
    <body
    >hello world</body>
  </html

Reproducible Demo

Codesandbox

Environment

  • Version: 3.0.0 (also tried on 1.4.0)
  • Platform: macOS 12.3.1
  • Browser: Chrome 103

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions