diff --git a/demos/demo-jetty-webapp/src/main/webapp/chat/index.html b/demos/demo-jetty-webapp/src/main/webapp/chat/index.html index 53e4795b1c2..4b72641b032 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/chat/index.html +++ b/demos/demo-jetty-webapp/src/main/webapp/chat/index.html @@ -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); } diff --git a/demos/demo-jetty-webapp/src/main/webapp/javax.websocket/index.html b/demos/demo-jetty-webapp/src/main/webapp/javax.websocket/index.html index 7172f47e824..756e9a9c6c1 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/javax.websocket/index.html +++ b/demos/demo-jetty-webapp/src/main/webapp/javax.websocket/index.html @@ -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'); diff --git a/demos/demo-jetty-webapp/src/main/webapp/ws/index.html b/demos/demo-jetty-webapp/src/main/webapp/ws/index.html index a5260fdaffb..e02981ae110 100644 --- a/demos/demo-jetty-webapp/src/main/webapp/ws/index.html +++ b/demos/demo-jetty-webapp/src/main/webapp/ws/index.html @@ -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'); diff --git a/jetty-websocket/websocket-javax-tests/src/test/webapp/index.html b/jetty-websocket/websocket-javax-tests/src/test/webapp/index.html index ea6afb49856..be0e6957777 100644 --- a/jetty-websocket/websocket-javax-tests/src/test/webapp/index.html +++ b/jetty-websocket/websocket-javax-tests/src/test/webapp/index.html @@ -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');