I\'m running into an issue that I think is being caused by needing to double-up on some single quotes inside a string. However, JS\'s string.replace uses RegEx, and I\'ve ne
str.replace(/'/g, "''");
Be sure to use the global match flag (g) so that you replace any and all occurrences in the string. More info here.