I have a text box on a page, and when the user clicks "Submit" I grab the text field and post it with jQuery like this:
$("#text_submit").submit(function(event)){
user_text = $("input#user_text").val();
$.post("/create/", { text : user_text }, function(data){
//display response from server on the page;
});
event.preventDefault();
});
Then on the server side I'll validate the text (it's supposed to be a URL) and return a response.
Is it safe to post whatever the user puts in the text box to the server? Do I need to do any client-side validation of the user's text?