js json 的坑
1,拒绝执行内联代码——挪到js;
2,call to eval() blocked by CSP ——换用 JSON.parse();
3,SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data
[{...},{...},...]
var obj_array=eval(json); header_remove("Content-Security-Policy");
1,拒绝执行内联代码——挪到js;
2,call to eval() blocked by CSP ——换用 JSON.parse();
3,SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data
[{...},{...},...]
var obj_array=eval(json); header_remove("Content-Security-Policy");