Carriage returns causing problems in REST request?

following seems to do the trick:


var wn_formatted =  work_notes.replace(/\r?\n|\r/g, ';'); //replaces carriage return with ;


since discovered that using JSON.stringify() on the string, and setStringParameter
in lieu of setStringParameterNoEscape in the REST message
is safer belt and braces!


Comments

Popular posts from this blog

GlideRecord setValue

variable advanced reference qualifier example

URL link in addInfoMessage