pokoli/ButiJS — Issue #2: text should be filtered before inserting to avoid injections (src/public/client.js)
Author: jmgimeno
Created: 2011-11-11 11:11:43+00:00
State: open

socket.on('message', function(data){
var text;
if(data.player)
text = '<'+data.player+'> ';
text+=data.msg
$('#messages').prepend($('
' + text + '
'));
});