Fix NWS failing on non-ASCII messages
This commit is contained in:
parent
81d85311e7
commit
11734f5e62
2 changed files with 2 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ NotWebsocket.prototype.emit = function(msg, data) {
|
|||
return;
|
||||
}
|
||||
var pkt = [msg, data];
|
||||
var str = escape(JSON.stringify(pkt)).replace(/\//g, "%2F");
|
||||
var str = encodeURIComponent(JSON.stringify(pkt)).replace(/\//g, "%2F");
|
||||
$.getJSON(WEB_URL+"/nws/"+this.hash+"/"+str+"?callback=?", function() {
|
||||
// Poll more quickly because sending a packet usually means
|
||||
// expecting some data to come back
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue