Flow Designer issue - if data pill string has quotes it bombs out the entire step
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-28-2023 11:25 AM - edited 04-28-2023 11:48 AM
I am attempting to make a REST call via a custom Action in Flow Designer. I have two fields I am trying to pass in my Request Content that can potentially have quotation marks (or other potential 'bad' characters).
Is there something I can do other than throwing a bunch of .replace on them to try to account for troublesome characters?
I'm already doing this before my REST step to try to account for this, but I'm sure our users will come up with some unknown way to break this.
//For Description: Replaces carriage breaks and quotation marks
var desc = inputs.multiline;
var descNoLines = desc.replace(/(\r\n|\n|\r)/gm,"\\n").replace(/["']/g, "QUOTE");
outputs.nolines = descNoLines;
//For Short Description: Replaces quotation marks
var shortd = inputs.dirtyline;
var descNoJunk = shortd.replace(/(\r\n|\n|\r)/gm,"\\n").replace(/["']/g, "QUOTE");
outputs.cleanline = descNoJunk;
Then use them here:
0 REPLIES 0