Spaces were not stripped in search terms
I just realized the results of a search can be different if the search box contains a trailing space.
As an example compare the following (note the location of the "+" in the link):
- https://gitlab.com/search?project_id=3472737&search=r10579&scope=commits
- https://gitlab.com/search?project_id=3472737&search=+r10579&scope=commits
- https://gitlab.com/search?project_id=3472737&search=r10579+&scope=commits
While the first two turn up the result I was looking for, the last turns up empty!
I think the search should always strip leading/trailing space from the search terms as the user can not be expected to be aware of any whitespace they inadvertently copied into the search box.
I guess in the ideal case the front-end code would already take care of stripping spaces, so links like the above can not even be produced by typing in the search box (if the search back-end did a better job that would not hurt either, though).
Edited by Changzheng Liu