[Bug 18200] New: Fix a potential issue with preceding space in GetMarcUrls
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Bug ID: 18200 Summary: Fix a potential issue with preceding space in GetMarcUrls Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: MARC Bibliographic data support Assignee: gmcharlt@gmail.com Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Saw a small issue with a preceding space in 856$u once. Obviously, it is quite simple to prevent it. The current code puts http:// in front for that space. Proposed patch trims the url and adds few trivial tests in Biblio.t. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 60793 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60793&action=edit Bug 18200: Fix a potential issue with preceding space in GetMarcUrls Trims the URL in order prevent prefixing a space with http:// Normally you won't have a preceding space here, but I saw it happening one day and it does not cost much to resolve it. Bonus: Adding few simple tests in t/db_dependent/Biblio.t. Test plan: [1] Run t/db_dependent/Biblio.t [2] Add a 856$u with preceding space (MARC21) [3] Check opac-detail, Online access with OPACXSLTDetailsDisplay empty. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |m.de.rooy@rijksmuseum.nl Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60793|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 60808 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=60808&action=edit Bug 18200: Fix a potential issue with preceding space in GetMarcUrls Trims the URL in order prevent prefixing a space with http:// Normally you won't have a preceding space here, but I saw it happening one day and it does not cost much to resolve it. Bonus: Adding few simple tests in t/db_dependent/Biblio.t. Test plan: [1] Run t/db_dependent/Biblio.t [2] Add a 856$u with preceding space (MARC21) [3] Check opac-detail, Online access with OPACXSLTDetailsDisplay empty. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 --- Comment #3 from Marc Véron <veron@veron.ch> --- Question: The biblionumber is always added to the link, something like: http://XXXXXXXXXXX/cgi-bin/koha/tracklinks.pl?uri=http://www.yyyyyyyyyy.com&biblionumber=52 It happens with and without patch (with OPACXSLTDetailsDisplay empty). Is this behaviour expected? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marc Véron from comment #3)
Question: The biblionumber is always added to the link, something like:
http://XXXXXXXXXXX/cgi-bin/koha/tracklinks.pl?uri=http://www.yyyyyyyyyy. com&biblionumber=52
It happens with and without patch (with OPACXSLTDetailsDisplay empty).
Is this behaviour expected?
This behavior is triggered by pref TrackClicks. It manipulates the URL and appends a biblionumber. Thanks for testing. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #60808|0 |1 is obsolete| | --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 61036 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=61036&action=edit Bug 18200: Fix a potential issue with preceding space in GetMarcUrls Trims the URL in order prevent prefixing a space with http:// Normally you won't have a preceding space here, but I saw it happening one day and it does not cost much to resolve it. Bonus: Adding few simple tests in t/db_dependent/Biblio.t. Test plan: [1] Run t/db_dependent/Biblio.t [2] Add a 856$u with preceding space (MARC21) [3] Check opac-detail, Online access with OPACXSLTDetailsDisplay empty. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Followed test plan, works as expected Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |kyle@bywatersolutions.com --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to master for 17.05, thanks Marcel! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18200 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |katrin.fischer@bsz-bw.de Resolution|--- |FIXED --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This won't get ported back to 16.11.x as it is an enhancement. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org