-1

When I click on search button without entering the data it is navigating to blank page.

Also, whitespaces is not trimmed, but quoted instead:

enter image description here

The search should sanitize the input fields.

2
  • 5
    What sanitization would you like to see happen exactly, and why? Also, if you want to explicitly search for seven spaces, why should the search engine deny that?
    – CodeCaster
    Feb 15, 2017 at 8:34
  • The input Field in an application should have self validation. For empty input also it is sending request and getting response from server.if it has self validation it will not send response to server.it will improve the performance of the application Feb 15, 2017 at 8:45

1 Answer 1

11

I'd say this is fine as is.

If you don't enter a search term and hit the search button, you'll be shown a search page without any results, where you can build an advanced search query with help visible:

Advanced Search Tips

So the search page is one click away, and you aren't required to enter a bogus search term to get there.

it will improve the performance of the application

Besides the fact that the only people who can say something sensible about Stack Overflow's performance are the people implementing its software and monitoring its servers, the current behavior is actually already the best performance you can get, because when there's nothing to search, nothing will be searched.

Then the not trimming whitespace does look like a bug, because it finds nothing for even a single space, which I'm sure quite a few posts contain.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .