Fix 'Use GitLab' section search filter
What does this MR do and why?
Adjusts encoding for the search query string. While the search query needs spaces to be converted to plus signs, the search filters should not use this.
Because of this bug, filter values with multiple words (like "Use GitLab") were not matching any content; this was not very apparent because the "User docs" checkbox maps to multiple Docs sections (Use GitLab, Subscribe, Tutorials), and until recently, the site section breadcrumb wasn't shown alongside results.
Filter docs: https://developers.google.com/custom-search/docs/structured_search#filter-by-attribute
This bug was introduced here: !3969 (merged)
Closes #1699 (closed)
Validate
We should check that the "User docs" checkbox filter, which maps to multiple site sections, does indeed show docs from all of those sections.
- Visit the review app search page: https://1699-user-search-filter-borkage-gps.docs.gitlab-review.app/search/
- Search for something you know is in "Use GitLab," like
secrets - Filter the results by "User docs" and verify you see "Use GitLab" links
- Search for something in the Subscribe section, like
activate premium - Filter the results by "User docs" and verify you see "Subscribe" links
- Search for something in the Tutorials section, like
git tutorial - Filter the results by "User docs" and verify you see "Tutorial" links
Merge request acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this merge request.