Bug 14441 - TrackClicks cuts off/breaks URLs

to test...

1/ set TrackClicks syspref to 'track'

2/ add a problematic multipart url to an item's 'url' field
    example url: http://foo.corg?key1=val1&key2=val2

3/ test url in opac-detail.pl - url is corrupt

4/ apply patch - url is corrct

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Only fixes the item URLs - a follow-up for the URLs
in the bibliographic record (856 for MARC21) is still
needed.

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
(cherry picked from commit de2a298a06)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Mason James 2016-03-01 16:26:06 +13:00 committed by Julian Maurice
parent 5808b3de5b
commit 7e7b170feb
1 changed files with 3 additions and 3 deletions

View File

@ -352,7 +352,6 @@
<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">
[% END %]
[% END %]
[% MARCurl.linktext %]</a>
[% IF ( MARCurl.notes ) %]
<ul>
@ -1278,10 +1277,11 @@
[% IF ITEM_RESULT.uri %]
[% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]&amp;biblionumber=[% biblionumber |url %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
<a target="_blank" rel="noreferrer" href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblionumber |url %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
[% ELSE %]
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | url %]&amp;biblionumber=[% biblionumber |url %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% ITEM_RESULT.uri | uri %]&amp;biblionumber=[% biblionumber |url %]&amp;itemnumber=[% ITEM_RESULT.itemnumber | url %]" property="url"> Link to resource </a>
[% END %]
[% ELSE %]
[% IF Koha.Preference("OPACURLOpenInNewWindow") %]
<a target="_blank" rel="noreferrer" href="[% ITEM_RESULT.uri %]" property="url">[% ITEM_RESULT.uri %]</a>