I am creating a chat with websocket
, when I send a message it saves the message in the database. This is the example of how it sends the message post
ButtheproblemiswhenIsendajavascript
function(I'mtryingtodeletejavascriptinjection
ininputdamensagem
).Followtheprintofhowyouaresending(Allbugged)andonlysavesthebeginningofthemessage:
Can anyone solve this problem for me?
Here's the code in Jsfiddle of how I'm doing:
link (see the requests sent via XHR
to see the post being bogged).