Bug 37233: Library URL broken on in libraries tables

The URL given for a library is badly encoded in the table on the
/cgi-bin/koha/admin/branches.pl page.  As a result, clicking on the link
leads to 404 page.

Test plan:
==========
1. Have a library with a URL defined.
2. In the table on the Libraries page (/cgi-bin/koha/admin/branches.pl)
   click the link with the URL.
   You should get "Error 404".
3. Apply the patch; restart_all.
4. Go to the Libraries page.  Ctrl+R to reload JS.
   You should be able to reach the URL given in the library setup now.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 236075e0da)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Janusz Kaczmarek 2024-07-02 15:24:21 +00:00 committed by Lucas Gass
parent 11ed36f2b3
commit 937b39d05b
1 changed files with 1 additions and 1 deletions

View File

@ -707,7 +707,7 @@
if ( row.phone != null ) library_info.push(_("Ph: ") + row.phone.escapeHtml());
if ( row.fax != null ) library_info.push(_("Fax: ") + row.fax.escapeHtml());
if ( row.email != null ) library_info.push('<a href="mailto:'+encodeURIComponent(row.email)+'">'+row.email.escapeHtml()+'</a>');
if ( row.url != null ) library_info.push('<a href="'+encodeURIComponent(row.url)+'">'+row.url.escapeHtml()+'</a>');
if ( row.url != null ) library_info.push('<a href="'+encodeURI(row.url)+'">'+row.url.escapeHtml()+'</a>');
if ( row.notes != null ) library_info.push(_("Notes")+': '+row.notes.escapeHtml());
return library_info.join('<br/>');
},