I\'m trying to replace the \"\'\" character with the \"\'\'\" string using the replace method, like this:
temp.replace(\"\\\'\", \"\'\'\");
but
while (str.indexOf("'") >= 0) { var newStr = str.replace("'", "\""); str = newStr; }