Bug 25291: Escape barcode in ReturnClaims table display

Test Plan:

1) Set ClaimReturnedLostValue
2) Create a checkout
3) Claim a return
4) Change the barcode to something with html inside, </a> will do

Without this patch cgi-bin/koha/members/moremember.pl claim tab barcode link is broken.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Didier Gautheron 2020-04-27 14:42:49 +02:00 committed by Martin Renvoize
parent 0b72e7d666
commit 1e53d94882
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 7 additions and 1 deletions

View File

@ -908,7 +908,13 @@ $(document).ready(function() {
if ( oObj.author ) {
title += ' by ' + oObj.author;
}
title += ' <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=' + oObj.biblionumber + '&itemnumber=' + oObj.itemnumber + '">' + oObj.barcode + '</a>';
title += ' <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber='
+ oObj.biblionumber
+ '&itemnumber='
+ oObj.itemnumber
+ '">'
+ (oObj.barcode ? oObj.barcode.escapeHtml() : "")
+ '</a>';
return title;
}