json-viewer icon indicating copy to clipboard operation
json-viewer copied to clipboard

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

Open tom-sherman opened this issue 1 year ago • 0 comments

I originally raised this in https://github.com/vercel/next.js/issues/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>

tom-sherman avatar May 21 '24 16:05 tom-sherman