dillon1000/react
Commit
Browse files compiler: workaround babel issue with html entity escaping
Babel doesn't seem to properly preserve escaping of HTML entities when emitting JSX text children, so this commit works around the issue by emitting a JsxExpressionContainer for JSX children that contain ">", "<", or "&" characters. Closes #29100 ghstack-source-id: 2d0622397cc067c6336f3635073e07daef854084 Pull Request resolved: https://github.com/facebook/react/pull/29143
Changed paths3 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/CodegenReactiveFunction.ts ModifiedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-html-entity.expect.md AddedA compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/jsx-html-entity.js AddedPatch
Files changed
Rendering syntax-highlighted changes…