Bug 33066: Restore HTML escaping
And we add a render function that will escape by default Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Agustín Moyano <agustinmoyano@theke.io> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
1c03ff77b2
commit
4e129cd5fe
|
|
@ -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)
|
||||
: ""
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
: ""
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue