diff --git a/examples/rooms/client.html b/examples/rooms/client.html index ebaa6aa..1cf1b09 100644 --- a/examples/rooms/client.html +++ b/examples/rooms/client.html @@ -9,7 +9,11 @@ // Listen for the announce event. io.on('announce', function(data) { - $('body').append('

'+data.message+ new Date().toString()+'

') + + // Removing the html tags to prevent XSS + var msg = $('
').text(data.message).text(); + + $('body').append('

'+msg+ new Date().toString()+'

') })