I\'m currently having the problem mentioned in the title and I\'m somehow not finding a way to properly replace backsashes with double backslashes, so that I can properly gi
WSParameters.replace(/\\/g, "\\\\"); should do it, and in FF18 as well. Notice that if you use JSON.stringify, this is done automatically. Also watch out that many console outputs (Firebug etc) do surround string contents with quotes, but do not escape them.