mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
[compiler][ez] Patch for JSX escape sequences in @babel/generator (#32131)
Fall back to using JSXExpressionContainer for strings potentially containing escape sequences (a single backslash) to fix https://github.com/facebook/react/issues/32123. This is an extension of https://github.com/facebook/react/pull/29079
This commit is contained in:
parent
19557443c8
commit
7c864c9834
|
|
@ -2269,7 +2269,7 @@ function codegenInstructionValue(
|
|||
* https://en.wikipedia.org/wiki/List_of_Unicode_characters#Control_codes
|
||||
*/
|
||||
const STRING_REQUIRES_EXPR_CONTAINER_PATTERN =
|
||||
/[\u{0000}-\u{001F}\u{007F}\u{0080}-\u{FFFF}]|"/u;
|
||||
/[\u{0000}-\u{001F}\u{007F}\u{0080}-\u{FFFF}]|"|\\/u;
|
||||
function codegenJsxAttribute(
|
||||
cx: Context,
|
||||
attribute: JsxAttribute,
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ function MyApp() {
|
|||
const $ = _c(1);
|
||||
let t0;
|
||||
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
||||
t0 = <input pattern="\\w" />;
|
||||
t0 = <input pattern={"\\w"} />;
|
||||
$[0] = t0;
|
||||
} else {
|
||||
t0 = $[0];
|
||||
|
|
|
|||
|
|
@ -42,15 +42,23 @@ function V0(t0) {
|
|||
<ComponentC cd="TxqUy" ce="oh`]uc" cf="Bdbo" c10={!V9.va && v11.v12}>
|
||||
gmhubcw
|
||||
{v1 === V3.V13 ? (
|
||||
<c14 c15="L^]w\\\\T\\\\qrGmqrlQyrvBgf\\\\inuRdkEqwVPwixiriYGSZmKJf]E]RdT{N[WyVPiEJIbdFzvDohJV[BV`H[[K^xoy[HOGKDqVzUJ^h">
|
||||
<c14
|
||||
c15={
|
||||
"L^]w\\\\T\\\\qrGmqrlQyrvBgf\\\\inuRdkEqwVPwixiriYGSZmKJf]E]RdT{N[WyVPiEJIbdFzvDohJV[BV`H[[K^xoy[HOGKDqVzUJ^h"
|
||||
}
|
||||
>
|
||||
iawyneijcgamsfgrrjyvhjrrqvzexxwenxqoknnilmfloafyvnvkqbssqnxnexqvtcpvjysaiovjxyqrorqskfph
|
||||
</c14>
|
||||
) : v16.v17("pyorztRC]EJzVuP^e") ? (
|
||||
<c14 c15="CRinMqvmOknWRAKERI]RBzB_LXGKQe{SUpoN[\\\\gL[`bLMOhvFqDVVMNOdY">
|
||||
<c14
|
||||
c15={
|
||||
"CRinMqvmOknWRAKERI]RBzB_LXGKQe{SUpoN[\\\\gL[`bLMOhvFqDVVMNOdY"
|
||||
}
|
||||
>
|
||||
goprinbjmmjhfserfuqyluxcewpyjihektogc
|
||||
</c14>
|
||||
) : (
|
||||
<c14 c15="H\\\\\\\\GAcTc\\\\lfGMW[yHriCpvW`w]niSIKj\\\\kdgFI">
|
||||
<c14 c15={"H\\\\\\\\GAcTc\\\\lfGMW[yHriCpvW`w]niSIKj\\\\kdgFI"}>
|
||||
yejarlvudihqdrdgpvahovggdnmgnueedxpbwbkdvvkdhqwrtoiual
|
||||
</c14>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user