From 6a1ce65166829a75fb9a90e8d6f5e30eadfc92a4 Mon Sep 17 00:00:00 2001 From: Arial7 Date: Wed, 8 Mar 2017 11:48:30 +0100 Subject: [PATCH] Escape double quotes in string prompts --- lib/ask.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ask.js b/lib/ask.js index f2c3c9ef60..bfe50418e2 100644 --- a/lib/ask.js +++ b/lib/ask.js @@ -57,6 +57,8 @@ function prompt (data, key, prompt, done) { answers[key].forEach(function (multiChoiceAnswer) { data[key][multiChoiceAnswer] = true }) + } else if (typeof answers[key] == "string"){ + data[key] = answers[key].replace(/"/g, '\\"') } else { data[key] = answers[key] }