mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-04 12:47:14 +02:00
fix(v2): escape apostrophe in route paths (#4137)
This commit is contained in:
parent
98910656c4
commit
d801ce50f2
1 changed files with 1 additions and 1 deletions
|
@ -136,7 +136,7 @@ export default async function loadRoutes(
|
||||||
};
|
};
|
||||||
|
|
||||||
return createRouteCodeString({
|
return createRouteCodeString({
|
||||||
routePath: routeConfig.path,
|
routePath: routeConfig.path.replace(/'/g, "\\'"),
|
||||||
routeHash,
|
routeHash,
|
||||||
exact,
|
exact,
|
||||||
subroutesCodeStrings: subroutes?.map(generateRouteCode),
|
subroutesCodeStrings: subroutes?.map(generateRouteCode),
|
||||||
|
|
Loading…
Add table
Reference in a new issue