]> git.koha-community.org Git - koha.git/commit
Bug 30262: Trim whitespace off tracklinks.pl URLs
authorDavid Cook <dcook@prosentient.com.au>
Thu, 10 Mar 2022 04:02:49 +0000 (04:02 +0000)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Mon, 14 Nov 2022 10:55:12 +0000 (11:55 +0100)
commite6657228772fb980c0566ee1a2462a902a5abdfa
tree3617c8bc4920a26544d42ef7a40a41db0187aeea
parent9c0e06b8a18d24e2eedf5ebe376cab22cc0fbc4a
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

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Added the link with a space at the end. Verified that without the
patch, clickin on "Click here to access online" gives a 404. After
applying the patch the redirect works as expected.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 5fe49c7db1113026d242ad081c6b100fc8bae76e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 088139a89eb8a2676fd9e29f8544dee777ef883c)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
opac/tracklinks.pl