[Koha-bugs] [Bug 30262] opac/tracklinks.pl inconsistent with GetMarcUrls for whitespace

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Aug 26 09:44:53 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30262

Magnus Enger <magnus at libriotech.no> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #139815|0                           |1
        is obsolete|                            |

--- Comment #3 from Magnus Enger <magnus at libriotech.no> ---
Created attachment 139817
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=139817&action=edit
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 at 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list