mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
a1ece33413abec9c3d82292d09a9aebe6cc58673
We encode strings 2048 UTF-8 bytes at a time. If the string we are
encoding crosses to the next chunk but the current chunk doesn't fit an
integral number of characters, we need to make sure not to send the
whole buffer, only the bytes that are actually meaningful.
Fixes #24985. I was able to verify that this fixes the repro shared in
the issue (be careful when testing because the null bytes do not show
when printed to my terminal, at least). However, I don't see a clear way
to add a test for this that will be resilient to small changes in how we
encode the markup (since it depends on where specific multibyte
characters fall against the 2048-byte boundaries).
DiffTrain build for [96cdeaf89b](https://github.com/facebook/react/commit/96cdeaf89bfde7551b4ffe4d685da169b780f2f7)
Please do not delete this branch
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%