double quotes ("") not sending through a rest message

Jack62
Giga Guru

Evening all,

 

We are having an issue in which when we send double quotes, as in "", it is not sending. All other special characters are and we have added double escaping to the script include however checking the logs, the integration is not even triggered.

 

Jack

3 REPLIES 3

James Chun
Kilo Patron

Hi @Jack62,

 

Have you tried using \ characters to escape the double quotes?

e.g. 

{ "myKey" : "Some values \"Escape here\" "};

If it doesn't work, can you share the code?

 

Cheers

Hey James,

so my script snippet is below, when I check postman the other side is now showing; 

 "description": "testing double quotes on new ticket \" \"",

 

 

 if(field[2] != ''){
    var text = field[2];
var new_text = text.replace(/\\r\\n/g, '\r\n');
gs.log("New Description " + new_text);
newRecord.description = new_text;
   
     }

Hey @Jack62,

 

Kinda hard to tell what's wrong by just looking at a snippet of the code.

Would you be able to provide an example data of the 'field[2]'?