Bugzilla – Attachment 111736 Details for
Bug 26572
Add autocomplete to librarian field in log viewer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26592: (QA follow-up) Escape strings in autocomplete
Bug-26592-QA-follow-up-Escape-strings-in-autocompl.patch (text/plain), 1.80 KB, created by
Owen Leonard
on 2020-10-15 13:37:39 UTC
(
hide
)
Description:
Bug 26592: (QA follow-up) Escape strings in autocomplete
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2020-10-15 13:37:39 UTC
Size:
1.80 KB
patch
obsolete
>From e4a85d13638d5d1075d5b465b7cc3ee4a47f95f5 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 15 Oct 2020 13:33:29 +0000 >Subject: [PATCH] Bug 26592: (QA follow-up) Escape strings in autocomplete > >This patch updates the construction of the autocomplete dropdown so that >values are escaped. > >https://bugs.koha-community.org/show_bug.cgi?id=26572 >--- > koha-tmpl/intranet-tmpl/prog/js/viewlog.js | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >index ff835f5787..0b867b05bc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/viewlog.js >@@ -159,9 +159,15 @@ $(document).ready(function(){ > // Display card number in parentheses if it exists > cardnumber = " (" + item.cardnumber + ") "; > } >+ var itemString = "<a href=\"#\">" + (item.surname ? item.surname.escapeHtml() : "") + ", " + (item.firstname ? item.firstname.escapeHtml() : "") + cardnumber.escapeHtml() + " <small>"; >+ itemString += (item.address ? item.address.escapeHtml() : "") + " " >+ + (item.city ? item.city.escapeHtml() : "") + " " >+ + (item.zipcode ? item.zipcode.escapeHtml() : "") + " " >+ + (item.country ? item.country.escapeHtml() : "") >+ + "</small></a>"; > return $("<li></li>") > .data("ui-autocomplete-item", item) >- .append("<a href=\"#\">" + item.surname + ", " + item.firstname + cardnumber + " <small>" + item.dateofbirth + " " + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>") >+ .append(itemString) > .appendTo(ul); > }; > } >-- >2.11.0
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 26572
:
110938
|
110977
|
111637
|
111664
|
111736
|
112984