Filtered search bar encodes spaces in search param incorrectly

Summary

Filtered search bar encodes spaces in search param incorrectly

Steps to reproduce

  1. Go to issues page (Eg. https://gitlab.com/gitlab-org/gitlab-ce/issues)

  2. Perform the search bug report in the search bar

  3. Notice that the URL encodes as https://gitlab.com/gitlab-org/gitlab-ce/issues?scope=all&utf8=%E2%9C%93&state=opened&search=bug%20report

  4. Go to the MR page (Eg. https://gitlab.com/gitlab-org/gitlab-ce/merge_requests)

  5. Perform the search bug report in the small Filter by name bar

  6. Notice that the URL encodes as https://gitlab.com/gitlab-org/gitlab-ce/merge_requests?scope=all&state=opened&utf8=%E2%9C%93&search=bug+report

Expected behavior

Issues search should encode the search param as search=bug+report

Actual behavior

Issues search encodes the search param as search=bug%20report