Skip to content

Commit

Permalink
Fix escaping in action error URL (#27273)
Browse files Browse the repository at this point in the history
This URL is generated on the client (there's an equivalent but shorter
SSR version too) when a function is used as an action. It should never
happen but it'll be invoked if a form is manually submitted or event is
stopped early.

The `'` wasn't escaped so this yielded invalid syntax. Which is an error
too but much less helpful. `missing ) after argument list`. Added a test
that evals to make sure it's correct syntax.

DiffTrain build for commit 856dc5e.
  • Loading branch information
sebmarkbage committed Aug 22, 2023
1 parent 5dbb6a2 commit d9702d1
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23977,7 +23977,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-canary-31034b6de-20230822";
var ReactVersion = "18.3.0-canary-856dc5e43-20230822";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8612,7 +8612,7 @@ var devToolsConfig$jscomp$inline_1029 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-31034b6de-20230822",
version: "18.3.0-canary-856dc5e43-20230822",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1228 = {
Expand Down Expand Up @@ -8643,7 +8643,7 @@ var internals$jscomp$inline_1228 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-31034b6de-20230822"
reconcilerVersion: "18.3.0-canary-856dc5e43-20230822"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1229 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9038,7 +9038,7 @@ var devToolsConfig$jscomp$inline_1071 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-canary-31034b6de-20230822",
version: "18.3.0-canary-856dc5e43-20230822",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1269 = {
Expand Down Expand Up @@ -9069,7 +9069,7 @@ var internals$jscomp$inline_1269 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-canary-31034b6de-20230822"
reconcilerVersion: "18.3.0-canary-856dc5e43-20230822"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1270 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-canary-31034b6de-20230822";
var ReactVersion = "18.3.0-canary-856dc5e43-20230822";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-31034b6de-20230822";
exports.version = "18.3.0-canary-856dc5e43-20230822";
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactCurrentDispatcher.current.useTransition();
};
exports.version = "18.3.0-canary-31034b6de-20230822";
exports.version = "18.3.0-canary-856dc5e43-20230822";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
31034b6de73c7cd9093e92a34e384d84c082aa4e
856dc5e43352454b1d06c13e233d565ceda77e61

0 comments on commit d9702d1

Please sign in to comment.