Skip to content
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

Bug: SSR of malformed? meta renders nothing(working in 18.2) #25928

Open
eps1lon opened this issue Dec 23, 2022 · 0 comments
Open

Bug: SSR of malformed? meta renders nothing(working in 18.2) #25928

eps1lon opened this issue Dec 23, 2022 · 0 comments

Comments

@eps1lon
Copy link
Collaborator

eps1lon commented Dec 23, 2022

React version:

Steps To Reproduce

  1. SSR <meta name="test" /> (renderToString and renderToReadableStream)

Link to code example:

The current behavior

Renders empty string

The expected behavior

Renders <meta name="test" />
Don't know if that's a valid use case but it should at least warn that the meta tag is malformed?

This broke the attribute fixture (originally reported in #25927).

Also:

  1. <meta name="description" content={content} /> renders nothing unless content is a string.
  2. <meta http-equiv /> i.e. any http-equiv usage no longer renders anything. It used to warn at least.
@eps1lon eps1lon changed the title Bug: SSR of just a meta tag throws in next release (working in 18.2) Bug: SSR of malformed? meta renders nothing(working in 18.2) Dec 23, 2022
eps1lon added a commit that referenced this issue Feb 10, 2023
## Summary

Due to #25928 the attribute
fixture could no longer finish since it expects at least something to
render. But since Fizz currently breaks down completely on malformed
`<meta>` tags, the fixture could no longer handle this.

The fixture now renders valid types for `meta` tags.

Note that the snapshot change to `viewTarget`` is already on `main`.
Review by commit helps to understand this.

Added `html[lang]` so that we test at least one standard attribute on
`<html>`. `version` is obsolete so results are not that trustworthy.

## How did you test this change?

With Chrome Version 109.0.5414.119 (Official Build) (64-bit)

- `yarn build --type=UMD_DEV react/index,react-dom && cd
fixtures/attribute-behavior && yarn install && yarn start`
github-actions bot pushed a commit that referenced this issue Feb 10, 2023
## Summary

Due to #25928 the attribute
fixture could no longer finish since it expects at least something to
render. But since Fizz currently breaks down completely on malformed
`<meta>` tags, the fixture could no longer handle this.

The fixture now renders valid types for `meta` tags.

Note that the snapshot change to `viewTarget`` is already on `main`.
Review by commit helps to understand this.

Added `html[lang]` so that we test at least one standard attribute on
`<html>`. `version` is obsolete so results are not that trustworthy.

## How did you test this change?

With Chrome Version 109.0.5414.119 (Official Build) (64-bit)

- `yarn build --type=UMD_DEV react/index,react-dom && cd
fixtures/attribute-behavior && yarn install && yarn start`

DiffTrain build for [b8ae89f](b8ae89f)
[View git log for this commit](https://github.com/facebook/react/commits/b8ae89f38288bfae37dff54fa1ec4bf3b4555ed5)
jerrydev0927 added a commit to jerrydev0927/react that referenced this issue Jan 5, 2024
## Summary

Due to facebook/react#25928 the attribute
fixture could no longer finish since it expects at least something to
render. But since Fizz currently breaks down completely on malformed
`<meta>` tags, the fixture could no longer handle this.

The fixture now renders valid types for `meta` tags.

Note that the snapshot change to `viewTarget`` is already on `main`.
Review by commit helps to understand this.

Added `html[lang]` so that we test at least one standard attribute on
`<html>`. `version` is obsolete so results are not that trustworthy.

## How did you test this change?

With Chrome Version 109.0.5414.119 (Official Build) (64-bit)

- `yarn build --type=UMD_DEV react/index,react-dom && cd
fixtures/attribute-behavior && yarn install && yarn start`

DiffTrain build for [b8ae89f38288bfae37dff54fa1ec4bf3b4555ed5](facebook/react@b8ae89f)
[View git log for this commit](https://github.com/facebook/react/commits/b8ae89f38288bfae37dff54fa1ec4bf3b4555ed5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant