Baidu editor echo JS error uncaught syntax error: invalid or unexpected token

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: