diff --git a/bun.lockb b/bun.lockb index 89dea1714..90302990d 100644 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 1e33a9889..0fca6f6e5 100644 --- a/package.json +++ b/package.json @@ -74,6 +74,7 @@ "sharp": "^0.33.4", "three": "0.159.0", "three-stdlib": "^2.30.4", + "urlon": "^3.1.0", "vitepress": "^1.3.0", "vitepress-plugin-auto-sidebar": "^1.2.0", "yaml": "^2.4.5", diff --git a/src/app/tools/embed/[embed]/page.tsx b/src/app/tools/embed/[embed]/page.tsx index 851418ebf..46126b089 100644 --- a/src/app/tools/embed/[embed]/page.tsx +++ b/src/app/tools/embed/[embed]/page.tsx @@ -12,6 +12,7 @@ import { import { Box, Button, Flex, Heading, ScrollArea, Text } from '@radix-ui/themes'; import { capitalize, startCase } from 'lodash'; import { ReactNode, useEffect, useRef, useState } from 'react'; +import { stringify } from 'urlon'; import { CopyButton } from '../../../../components/CopyButton'; import { NAVBAR_HEIGHT } from '../../../../components/Navbar'; import PageWrapper from '../../../../components/PageWrapper'; @@ -94,7 +95,7 @@ export default function Page({ const searchParams = new URLSearchParams({ id: `${wargaming.id}`, - state: JSON.stringify(shallowState), + state: stringify(shallowState), }); return `${location.origin}/tools/embed/${params.embed}/host?${searchParams.toString()}`;