Bugzilla – Attachment 147917 Details for
Bug 33066
We need a KohaTable Vue component
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33066: Restore HTML escaping
Bug-33066-Restore-HTML-escaping.patch (text/plain), 3.79 KB, created by
Jonathan Druart
on 2023-03-08 12:26:51 UTC
(
hide
)
Description:
Bug 33066: Restore HTML escaping
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-03-08 12:26:51 UTC
Size:
3.79 KB
patch
obsolete
>From da48fb7d546a8b515ccd738afc1e7ffb299887e0 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 7 Mar 2023 17:40:20 +0100 >Subject: [PATCH] Bug 33066: Restore HTML escaping > >And we add a render function that will escape by default >--- > .../prog/js/vue/components/ERM/AgreementsList.vue | 6 ++++-- > .../prog/js/vue/components/ERM/LicensesList.vue | 6 ++++-- > .../prog/js/vue/components/KohaTable.vue | 11 +++++++++++ > 3 files changed, 19 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >index 9ab336a0809..e66c9eb0807 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/AgreementsList.vue >@@ -224,7 +224,7 @@ export default { > '<a href="/cgi-bin/koha/erm/agreements/' + > row.agreement_id + > '" class="show">' + >- row.name + >+ escape_str(row.name) + > "</a>" > ) > }, >@@ -235,7 +235,9 @@ export default { > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >- return row.vendor_id != undefined ? row.vendor.name : "" >+ return row.vendor_id != undefined >+ ? escape_str(row.vendor.name) >+ : "" > }, > }, > { >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >index ab2603010cf..62308ef60d2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/ERM/LicensesList.vue >@@ -140,7 +140,7 @@ export default { > '<a href="/cgi-bin/koha/erm/licenses/' + > row.license_id + > '" class="show">' + >- row.name + >+ escape_str(row.name) + > "</a>" > ) > }, >@@ -151,7 +151,9 @@ export default { > searchable: true, > orderable: true, > render: function (data, type, row, meta) { >- return row.vendor_id != undefined ? row.vendor.name : "" >+ return row.vendor_id != undefined >+ ? escape_str(row.vendor.name) >+ : "" > }, > }, > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >index 6965576a990..3e5d809ed06 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >+++ b/koha-tmpl/intranet-tmpl/prog/js/vue/components/KohaTable.vue >@@ -50,6 +50,17 @@ export default { > }, > buttons, > search: { search: this.$route.query.q }, >+ columnDefs: [ >+ { >+ targets: "_all", >+ render: function (data, type, row, meta) { >+ if (type == "display") { >+ return escape_str(data) >+ } >+ return data >+ }, >+ }, >+ ], > ...this.options, > }, > hidden_ids, >-- >2.25.1
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 33066
:
147352
|
147353
|
147354
|
147692
|
147693
|
147694
|
147713
|
147846
|
147847
|
147848
|
147849
|
147850
|
147851
|
147852
|
147853
|
147855
|
147856
|
147857
|
147858
|
147862
|
147865
|
147902
|
147903
|
147904
|
147905
|
147906
|
147907
|
147908
|
147909
|
147910
|
147911
|
147912
|
147913
|
147914
|
147915
|
147916
|
147917
|
147918
|
147921
|
147922
|
147923
|
147925
|
147926
|
147928
|
147957
|
147960
|
147971
|
147972
|
148718
|
149158
|
149159
|
149160
|
149161
|
149162
|
149163
|
149164
|
149165
|
149166
|
149167
|
149168
|
149169
|
149170
|
149171
|
149172
|
149173
|
149174
|
149175
|
149176
|
149177
|
149178
|
149179
|
149180
|
149181
|
149182
|
149183