This error is because the echoed content contains carriage return, which leads to JS error. The solution is as follows:
$vo[‘content’] = strreplace(array(“\r\n”, “\ r”, “\ n”, “””, ““”, “\””), “”, htmlspecialcharsdecode($vo[‘content’]));
Read More:
- Uncaught syntax error: unexpected token ‘< 0‘
- chunk-vendors.7142f8da.js:1 Uncaught SyntaxError: Unexpected token ‘<‘
- Solve the problem of syntax error: unexpected end of file or syntax error near unexpected token ` fi ‘error
- Strange exception 001: invalid or unexpected token
- ERROR in static/js/app.xxxxxxx.js from UglifyJs Unexpected token: operator (>)
- Shell script execution error: “syntax error near unexpected token”
- Syntax error: unexpected token in uni app project compilation
- Unexpected syntax error: unexpected token<
- Unexpected token appears in JS
- Shell script syntax error near unexpected token ‘$’Do
- syntax error near unexpected token `else’
- syntax error near unexpected token `then’ problem solution
- JS error: unexpected token u in JSON at position 0
- Syntax error near unexpected token `newline’script cannot be executed
- Syntax error near unexpected token ‘$’Do is reported when running bash file
- Solve the problem of shell script “syntax error near unexpected token `fi’”.
- Docker machine install syntax error near unexpected token ‘newline’! DOCTYPE HTML problem resolution
- Error: unexpected syntax error: unexpected token<
- Error: syntax error – unexpected token P in JSON at position 0