Bugzilla – Attachment 106854 Details for
Bug 25293
Don't call escapeHtml on null
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25293: Don't call escapeHtml on null
Bug-25293-Dont-call-escapeHtml-on-null.patch (text/plain), 3.84 KB, created by
Katrin Fischer
on 2020-07-13 21:31:03 UTC
(
hide
)
Description:
Bug 25293: Don't call escapeHtml on null
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2020-07-13 21:31:03 UTC
Size:
3.84 KB
patch
obsolete
>From ed50f591550e3bb35dcdecc5dff8e075a55228d9 Mon Sep 17 00:00:00 2001 >From: Didier Gautheron <didier.gautheron@biblibre.com> >Date: Tue, 28 Apr 2020 07:43:46 +0200 >Subject: [PATCH] Bug 25293: Don't call escapeHtml on null > > Test Plan: > > 1) Create two Checkouts > 2) view patron's checkout list > cgi-bin/koha/members/moremember.pl?borrowernumber=pp <show > checkout> > 3) in mysql shell delete a checkout home branch: update items set > homebranch = null where itemnumber = xx; > 4) view patron's checkout list, again > > Without this patch the list is empty. > > Same if biblio title is null (update biblio set title = null where > biblionumber = yy;). > Javascript error: > TypeError: oObj.title is null > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/js/checkouts.js | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >index 6e639bc533..41c3562a67 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/checkouts.js >@@ -289,10 +289,10 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- title = "<span id='title_" + oObj.itemnumber + "' class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >+ let title = "<span id='title_" + oObj.itemnumber + "' class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" > + oObj.biblionumber > + "'>" >- + oObj.title.escapeHtml(); >+ + (oObj.title ? oObj.title.escapeHtml() : '' ); > > $.each(oObj.subtitle, function( index, value ) { > title += " " + value.escapeHtml(); >@@ -369,7 +369,7 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- return oObj.homebranch.escapeHtml(); >+ return (oObj.homebranch ? oObj.homebranch.escapeHtml() : '' ); > } > }, > { >@@ -382,7 +382,7 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- return oObj.branchname.escapeHtml(); >+ return (oObj.branchname ? oObj.branchname.escapeHtml() : '' ); > } > }, > { >@@ -663,10 +663,10 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- title = "<span class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" >+ let title = "<span class='strong'><a href='/cgi-bin/koha/catalogue/detail.pl?biblionumber=" > + oObj.biblionumber > + "'>" >- + oObj.title.escapeHtml(); >+ + (oObj.title ? oObj.title.escapeHtml() : '' ); > > $.each(oObj.subtitle, function( index, value ) { > title += " " + value.escapeHtml(); >@@ -751,7 +751,7 @@ $(document).ready(function() { > }, > { > "mDataProp": function ( oObj ) { >- return oObj.branchname.escapeHtml(); >+ return ( oObj.branchname ? oObj.branchname.escapeHtml() : '' ); > } > }, > { >-- >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 25293
:
103862
|
106634
| 106854