Fixes issue with semicolon in form data (CURL)#277
Fixes issue with semicolon in form data (CURL)#277umeshp7 merged 3 commits intopostmanlabs:developfrom
Conversation
- adds check for semicolon and comma in form data
- encloses form data value if semicolon/comma is present
- Modifies sanitize function, adds follows
- adds option to escape double quotes
- adds option to escape back slash
- encloses all form data value in double quotes - adds following options to sanitize funtion - excape backslash - escape double quotes - escapes \, " , from form data values - Modifies unit test to add quotes
|
https://travis-ci.com/github/postmanlabs/postman-code-generators/builds/169343297#L5074 Look at the value of "qu", it should simply be
Where are we checking if semicolon and/or comma are present in form data? According to the image you shared, the |
|
If we do that it conflicts with " inside the form data. Also the "qu" = .... Works perfectly on local it's device , it's just failing in ci |
That approach failed for strings containing " so had to enclose all the form data in double quotes
|
|
Problem is that behavior of |
77fc103 to
cecbe9b
Compare


fixes #257

Curl requires form data to be enclosed in double quotes if form data value contains semicolon or comma
This PR adds check for the above conditions and adds the following changes