diff --git a/src/components/CURL.astro b/src/components/CURL.astro index 80226dfec565ba..1ab70d8a753a84 100644 --- a/src/components/CURL.astro +++ b/src/components/CURL.astro @@ -41,7 +41,8 @@ if (json) { if (form) { const formLines = Object.entries(form).map( - ([key, value]) => `\t--form "${key}=${value}"`, + ([key, value]) => + `\t--form "${key}=${value.toString().replaceAll('"', '\\"')}"`, ); lines.push(...formLines); }