Skip to content

Commit

Permalink
Escape double quotes in string prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
riesinger committed Mar 8, 2017
1 parent 8772aa5 commit 6a1ce65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ask.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]
}
Expand Down

0 comments on commit 6a1ce65

Please sign in to comment.