Skip to content

Commit 160e35f

Browse files
committed
[Docs Site] Escape double quotes in CURL component
1 parent 45e821b commit 160e35f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/CURL.astro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ if (json) {
4141
4242
if (form) {
4343
const formLines = Object.entries(form).map(
44-
([key, value]) => `\t--form "${key}=${value}"`,
44+
([key, value]) =>
45+
`\t--form "${key}=${value.toString().replaceAll('"', '\\"')}"`,
4546
);
4647
lines.push(...formLines);
4748
}

0 commit comments

Comments
 (0)