Fix bad js replace in demos / test
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
ecea0e6d0a
commit
d3050dee7b
|
@ -32,8 +32,8 @@
|
|||
}
|
||||
function send(user, message, handler, join)
|
||||
{
|
||||
if (message) message = message.replace('%', '%25').replace('&', '%26').replace('=', '%3D');
|
||||
if (user) user = user.replace('%', '%25').replace('&', '%26').replace('=', '%3D');
|
||||
if (message) message = message.replaceAll('%', '%25').replaceAll('&', '%26').replaceAll('=', '%3D');
|
||||
if (user) user = user.replaceAll('%', '%25').replaceAll('&', '%26').replaceAll('=', '%3D');
|
||||
var requestBody = 'user=' + user + (message ? '&message=' + message : '') + (join ? '&join=true' : '');
|
||||
xhr('POST', 'chat', requestBody , handler);
|
||||
}
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
_onmessage: function(m) {
|
||||
if (m.data){
|
||||
var c=m.data.indexOf(':');
|
||||
var from=m.data.substring(0,c).replace('<','<').replace('>','>');
|
||||
var text=m.data.substring(c+1).replace('<','<').replace('>','>');
|
||||
var from=m.data.substring(0,c).replaceAll('<','<').replaceAll('>','>');
|
||||
var text=m.data.substring(c+1).replaceAll('<','<').replaceAll('>','>');
|
||||
|
||||
var chat=$('chat');
|
||||
var spanFrom = document.createElement('span');
|
||||
|
|
|
@ -44,8 +44,8 @@
|
|||
_onmessage: function(m) {
|
||||
if (m.data){
|
||||
var c=m.data.indexOf(':');
|
||||
var from=m.data.substring(0,c).replace('<','<').replace('>','>');
|
||||
var text=m.data.substring(c+1).replace('<','<').replace('>','>');
|
||||
var from=m.data.substring(0,c).replaceAll('<','<').replaceAll('>','>');
|
||||
var text=m.data.substring(c+1).replaceAll('<','<').replaceAll('>','>');
|
||||
|
||||
var chat=$('chat');
|
||||
var spanFrom = document.createElement('span');
|
||||
|
|
|
@ -52,8 +52,8 @@
|
|||
_onmessage: function (m) {
|
||||
if (m.data) {
|
||||
var c = m.data.indexOf(':');
|
||||
var from = m.data.substring(0, c).replace('<', '<').replace('>', '>');
|
||||
var text = m.data.substring(c + 1).replace('<', '<').replace('>', '>');
|
||||
var from = m.data.substring(0, c).replaceAll('<', '<').replaceAll('>', '>');
|
||||
var text = m.data.substring(c + 1).replaceAll('<', '<').replaceAll('>', '>');
|
||||
|
||||
var chat = $('chat');
|
||||
var spanFrom = document.createElement('span');
|
||||
|
|
Loading…
Reference in New Issue