Skip to content

Text node at the root of body tag in a html document is incorrectly wrapped in <text> #353

@tom-sherman

Description

@tom-sherman

I originally raised this in vercel/next.js#65985 as I thought it was a Next.js/React issue, but it's a bug in json-viewer it seems.

Steps to reproduce

Serve a html document with the content of <html><body>Hello world</body</html>. Make sure to include a Content-Type: text/html; charset=UTF-8 header.

Expected

HTML to be rendered with the exact content as above.

Actual

The text node is wrapped in <text>:

<html><body><text>Hello world</text></body</html>

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