Encode URI for the search bar value

This commit is contained in:
Yohann D'ANELLO 2020-10-15 16:49:34 +02:00
parent a7d455eeb1
commit a2fd82ee96
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@
$(document).ready(function () {
$('button[data-target="#searchModal"]').click(function() {
let modalBody = $("#searchModal div.modal-body");
let q = $("#search-term").val();
let q = encodeURI($("#search-term").val());
modalBody.load("{% url "haystack_search" %}?q=" + q + " #search-results");
});
$('a[data-target="#loginModal"]').click(function() {