Skip to content

Commit

Permalink
Merge #989
Browse files Browse the repository at this point in the history
989: URL encode search in web UI r=LegendreM a=akrantz01

Fixes #986 

Co-authored-by: Alex Krantz <alex@krantz.dev>
  • Loading branch information
bors[bot] and akrantz01 committed Oct 6, 2020
2 parents 4398f2c + 726e867 commit b406b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion meilisearch-http/public/interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ <h2 class="subtitle">
if (e.selectedIndex == -1) { return }
var index = e.options[e.selectedIndex].value;

let theUrl = `${baseUrl}/indexes/${index}/search?q=${search.value}&attributesToHighlight=*`;
let theUrl = `${baseUrl}/indexes/${index}/search?q=${encodeURIComponent(search.value)}&attributesToHighlight=*`;

if (lastRequest) { lastRequest.abort() }
lastRequest = new XMLHttpRequest();
Expand Down

0 comments on commit b406b6e

Please sign in to comment.