Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 tinyMce 作为我的编辑器。发送内容以保存在数据库中或将其回显,一切都很好。但是当一个&符号“&”出现时,之后的所有数据都会被截断并且不会保存在数据库中或回显我应该做什么。这里有文件,只有1kb,请下载运行,谢谢大家。
下载文件
如果你能找到摆脱“&”符号的好方法,请告诉我和其他人如何......
问题肯定出在js中。您应该使用 encodeURIComponent() 来发送 urlencoded 信息。如在
var parameters = 'message='+encodeURIComponent(message);
w3schools 上的 encodeURIComponent()