Skip to content

Commit 794d586

Browse files
Potential fix for code scanning alert no. 26: DOM text reinterpreted as HTML (#8304)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 78c202e commit 794d586

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

website/src/components/examples-sandbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export function ExamplesSandbox({ lazy = false, border = false, ...rest }: Examp
9797

9898
const { basePath } = useRouter();
9999

100-
const iframeSrc = `${basePath}/codesandbox-iframe.html?example=${exampleDir}`;
100+
const iframeSrc = `${basePath}/codesandbox-iframe.html?example=${encodeURIComponent(exampleDir)}`;
101101

102102
return (
103103
<div {...rest} className={cn('w-full', rest.className)}>

0 commit comments

Comments
 (0)