I am using these 2 functions:
http://javascript.about.com/library/bladdslash.htm
But JSLint complains 'Bad Escapement' on this line:
str=str.replace(/\\0/g,'\0');
[Edit]
I converted to 2 lines, and now the first line is the one that fails JLint:
var rep = '\0';
str=str.replace(/\\0/g,rep);
So it is the
'\0'
can you help? I could try something but I want to understand what is going on.
[/Edit]
Can you make a better version and explain?
I would like a version that passes JSLint and still works.