Skip to content

Commit a4af679

Browse files
authored
fix: encode search query to handle special characters (#1249)
Refs: PL-60
1 parent f95b804 commit a4af679

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/components/SearchBar/SearchBarComponent.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ const SearchBar = ({
173173
}
174174

175175
if (navigator) {
176-
navigator.push('search', { q: searchQuery });
176+
// Encode searchQuery to handle special characters in the URL
177+
navigator.push('search', { q: encodeURIComponent(searchQuery) });
177178
}
178179
}
179180
};

0 commit comments

Comments
 (0)