2
0

fix(webhook): 🐛 Properly escape backslash and quotes

This commit is contained in:
Baptiste Arnaud
2022-06-18 12:14:05 +02:00
parent 18c5ea5207
commit 20dbfe64c9
4 changed files with 17 additions and 6 deletions

View File

@ -143,13 +143,13 @@ export const executeWebhook =
json:
contentType !== 'x-www-form-urlencoded' && body
? safeJsonParse(
parseVariables(variables, { escapeLineBreaks: true })(body)
parseVariables(variables, { escapeForJson: true })(body)
)
: undefined,
form:
contentType === 'x-www-form-urlencoded' && body
? safeJsonParse(
parseVariables(variables, { escapeLineBreaks: true })(body)
parseVariables(variables, { escapeForJson: true })(body)
)
: undefined,
}