I am doing a web project using Java MVC, it has one search box. I am getting the search string from this text box and in turn calling a Javascript search script method. It in turn calls a Web service to search. Now if I search for a script like:
<script>alert("helllooooo")<\script >
then it alerts helloooo as well as searches using services. How can I avoid evaluating a script in this situation.