mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-25 03:35:18 +01:00
Properly stringify chat input, so that we wind up with value JSON (doublequote, and others)
This commit is contained in:
parent
d0e66d7e35
commit
7f662b2b1a
@ -21,7 +21,7 @@ componentconstructors['chat'] = function(dynmap, configuration) {
|
||||
if (dynmap.options.allowwebchat) {
|
||||
// Accepts 'sendchat'-events to send chat messages to the server.
|
||||
$(dynmap).bind('sendchat', function(event, message) {
|
||||
var data = '{"name":"'+ip+'","message":"'+message+'"}';
|
||||
var data = '{"name":'+JSON.stringify(ip)+',"message":'+JSON.stringify(message)+'}';
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'up/sendmessage',
|
||||
|
Loading…
Reference in New Issue
Block a user