Skip to content

Commit e2e1655

Browse files
authored
[Docs Site] Escape double quotes in CURL component (#21292)
1 parent 3e7e916 commit e2e1655

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)