Skip to content

Conversation

DavidWeid
Copy link
Contributor

@DavidWeid DavidWeid commented Sep 3, 2021

What does this PR do?

If a user's search contains # in the query, encode it to %23 before replacing the window.location for the search result page.

Motivation

https://datadoghq.atlassian.net/browse/WEB-1698

Preview

Search for C# or F#
https://docs-staging.datadoghq.com/davidweid/encode-hash-url/

Additional Notes

  • When searching a term with the "#" character, such as "F#" or "C#", search results shown as suggestions should include the "#". When the search is declared with the "Enter" key or by hitting the search button/icon, the page should redirect to the search results with a URL that has encoded "#" to "%23" and the results should match for "#".

Reviewer checklist

  • Review the changed files.
  • Review the URLs listed in the Preview section.

@DavidWeid DavidWeid requested review from a team as code owners September 3, 2021 20:01
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Sep 3, 2021
Copy link
Contributor

@alai97 alai97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for docs!

@alai97 alai97 merged commit c5ed33f into master Sep 7, 2021
@alai97 alai97 deleted the davidweid/encode-hash-url branch September 7, 2021 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Everything related to the Doc backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants