Bug 41783: Encode query parameters for suggestions filtering
When filtering by bibliographic information in the sidebar of the
suggestions management page, the '%' contained in the query is
not encoded. This can lead to errors if the search terms can be
evaluated as an encoded character.
Test plan:
1. Go to Acquisitions > Suggestions
2. Create a suggestion with a title like "200 recipes"
3. In "Filter by" > Bibliographic information, search for "200"
4. No results are shown in the table
5. Apply the patch
6. Search again (step 3). The suggestion should appear in the list.
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
75b7cc4a95
commit
61cffdc9f3
|
|
@ -1270,7 +1270,7 @@
|
|||
order: [[4, "asc"]],
|
||||
autoWidth: false,
|
||||
ajax: {
|
||||
url: "/api/v1/suggestions?q=" + JSON.stringify(tabSuggestionData.search_params),
|
||||
url: "/api/v1/suggestions?q=" + encodeURIComponent(JSON.stringify(tabSuggestionData.search_params)),
|
||||
delay: 300, // wait 300 milliseconds before triggering the request
|
||||
cache: true,
|
||||
dataType: "json",
|
||||
|
|
|
|||
Loading…
Reference in New Issue