Bugzilla – Attachment 104510 Details for
Bug 25279
Make the cities list use the API
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25279: (QA follow-up) Use .escapeHtml
Bug-25279-QA-follow-up-Use-escapeHtml.patch (text/plain), 1.75 KB, created by
Tomás Cohen Arazi
on 2020-05-07 13:11:15 UTC
(
hide
)
Description:
Bug 25279: (QA follow-up) Use .escapeHtml
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi
Created:
2020-05-07 13:11:15 UTC
Size:
1.75 KB
patch
obsolete
>From f289e1db8ccd0ebeae7bac0638663fefcca404e3 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 7 May 2020 10:10:18 -0300 >Subject: [PATCH] Bug 25279: (QA follow-up) Use .escapeHtml > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/js/staff-global.js | 7 +++++++ > 2 files changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >index c5287fd9b7..da530c8b2c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/cities.tt >@@ -186,7 +186,7 @@ > "targets": [0,1,2,3,4], > "render": function (data, type, row, meta) { > if ( type == 'display' ) { >- return $('<div />').text(data).html(); >+ return data.escapeHtml(); > } > return data; > } >diff --git a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >index 4c6f96c92b..fad4d616b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/staff-global.js >@@ -26,6 +26,13 @@ String.prototype.escapeHtml = function() { > }); > }; > >+/* >+ * Void method for numbers, for consistency >+ */ >+Number.prototype.escapeHtml = function() { >+ return this; >+}; >+ > // http://stackoverflow.com/questions/14859281/select-tab-by-name-in-jquery-ui-1-10-0/16550804#16550804 > $.fn.tabIndex = function () { > return $(this).parent().children('div').index(this); >-- >2.26.2
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 25279
:
103693
|
103694
|
103802
|
103803
|
103804
|
104065
|
104072
|
104359
|
104387
|
104416
|
104417
|
104420
|
104421
|
104423
|
104427
|
104428
|
104429
|
104430
|
104431
|
104432
|
104433
|
104434
|
104435
| 104510