Problem with validating '<' character in input box
Whenever I get the .val() of input box with javascript, everything after and including the < character is not included. So if I put "hello<yo" i receive hello.
So a user typing '<' anywhere in the textbox will either submit a false input he didn't want, or receive the wrong err开发者_如何学Cor message
(i.e. if he inputs "<hello", it will say it's blank)This seems to be fine in javascript alone. But I am getting the val() from javascript and then in ajax i am sending it to a php URl as a query string and validating it there on the php.
Any ideas?
Thank you.
EDIT: MY bad i didnt know there was a striptag() function being called in php
Instead of entering <
try entering <
.
精彩评论