Bugzilla – Attachment 192578 Details for
Bug 41783
Query parameters for suggestions filtering is not encoded
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41783: Encode query parameters for suggestions filtering
cae1beb.patch (text/plain), 1.87 KB, created by
David Nind
on 2026-02-06 04:19:28 UTC
(
hide
)
Description:
Bug 41783: Encode query parameters for suggestions filtering
Filename:
MIME Type:
Creator:
David Nind
Created:
2026-02-06 04:19:28 UTC
Size:
1.87 KB
patch
obsolete
>From cae1beb20f70a4f400ec1d059c724e4a49712780 Mon Sep 17 00:00:00 2001 >From: Maryse Simard <maryse.simard@inlibro.com> >Date: Thu, 5 Feb 2026 17:01:18 -0500 >Subject: [PATCH] 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> >--- > .../intranet-tmpl/prog/en/modules/suggestion/suggestion.tt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >index 806d9a1b26..8fc3280a07 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/suggestion/suggestion.tt >@@ -1332,7 +1332,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", >-- >2.39.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 41783
:
192576
| 192578