Skip to content

Commit

Permalink
Merge pull request #310 from helxplatform/bug-special-char-search
Browse files Browse the repository at this point in the history
BUG: Some special characters are lost during search
  • Loading branch information
hina-shah authored Jul 16, 2024
2 parents 47c1e9e + 877a9d8 commit bd95371
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/search/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ export const HelxSearch = ({ children }) => {
setSelectedResult(null)
setQuery(trimmedQuery)
setCurrentPage(1)
navigate(`${basePath}search?q=${trimmedQuery}&p=1`)
navigate(`${basePath}search?q=${encodeURIComponent(trimmedQuery)}&p=1`)
const existingHistoryEntry = searchHistory.find((searchHistoryEntry) => searchHistoryEntry.search === trimmedQuery)
if (!existingHistoryEntry) {
setSearchHistory([...searchHistory, {
Expand Down

0 comments on commit bd95371

Please sign in to comment.