2
I’m 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
But the problem is when I send a function javascript
(I’m trying to eliminate javascript injection
in the input da mensagem
). Follow the print of how it is sending (All buggy) and only save the beginning of the message:
Could someone solve this problem for me?
Follow the code in Jsfiddle of how I’m doing:
http://jsfiddle.net/otww9e2k/ (see the requests sent via XHR
to see the post getting bugged).
Take a look if this helps: http://jsfiddle.net/hympsp8f/
– Sergio
It didn’t work @Sergio
– David Damasceno
What is the error you have using my code? in devtools I see no error...
– Sergio
You know that right there in your image if you click on
view source
it displays exactly what you sent right?– Maicon Carraro
Sergio , you should look at the XHR, for you see the post giving the same bug :/
– David Damasceno
@Ricardo and after the user select how this selected data can be sent to mysql. My case is as http://answall.com/questions/181981/form-din%C3%A2mico-e-send-to-mysql-via-jquery-e-ajax? noredirect=1#comment376494_181981
– allan araujo