Unescaping of data in JS
Say i got a variable,
var s = "\"\\\"abc\\\"\"";
which is unescaped to "\"abc\""
when i display in the browser.
But i need it to be开发者_Go百科 further unescaped to the actual value "abc".
You can, but probably shouldn't, call eval
:
s = eval(s);
However, this is extremely dangerous.
For a safer solution, please provide more detail.
精彩评论