Bugzilla – Attachment 131534 Details for
Bug 30262
opac/tracklinks.pl inconsistent with GetMarcUrls for whitespace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30262: Trim whitespace off tracklinks.pl URLs
Bug-30262-Trim-whitespace-off-tracklinkspl-URLs.patch (text/plain), 1.40 KB, created by
David Cook
on 2022-03-10 04:13:09 UTC
(
hide
)
Description:
Bug 30262: Trim whitespace off tracklinks.pl URLs
Filename:
MIME Type:
Creator:
David Cook
Created:
2022-03-10 04:13:09 UTC
Size:
1.40 KB
patch
obsolete
>From 707b1f408bb9905c9238c71068723eded1ccbb4d Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 10 Mar 2022 04:02:49 +0000 >Subject: [PATCH] Bug 30262: Trim whitespace off tracklinks.pl URLs > >This patch trims whitespace off tracklinks.pl URLs so that >the URL is in the same format as the URLs returned by >C4::Biblio::GetMarcUrls, which is used by tracklinks.pl internally. > >Test plan: >0. Apply patch and koha-plack --restart kohadev >1. Go to http://localhost:8081/cgi-bin/koha/cataloguing/addbiblio.pl?biblionumber=29 >2. Add a 856 with $u of 'https://koha-community.org ' (note the space at the end0 >3. Save record >4. Change 'TrackClicks' syspref to 'Track' >5. Go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 >6. Click on the online resource (eg >http://localhost:8080/cgi-bin/koha/tracklinks.pl?uri=https%3A%2F%2Fkoha-community.org%20&biblionumber=29 >) >7. Note you are redirected to https://koha-community.org >--- > opac/tracklinks.pl | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/opac/tracklinks.pl b/opac/tracklinks.pl >index ce504c293b..3cda45520c 100755 >--- a/opac/tracklinks.pl >+++ b/opac/tracklinks.pl >@@ -30,6 +30,7 @@ use List::MoreUtils qw(any); > > my $cgi = CGI->new; > my $uri = $cgi->param('uri') || ''; >+$uri =~ s/^\s+|\s+$//g if $uri; # trim > my $biblionumber = $cgi->param('biblionumber') || 0; > my $itemnumber = $cgi->param('itemnumber') || 0; > >-- >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 30262
:
131534
|
139815
|
139817
|
139909