Bugzilla – Attachment 49557 Details for
Bug 14441
TrackClicks cuts off/breaks URLs
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14441: TrackClicks cuts off/breaks URLs (XSLT)
Bug-14441-TrackClicks-cuts-offbreaks-URLs-XSLT.patch (text/plain), 9.26 KB, created by
Katrin Fischer
on 2016-03-24 21:02:08 UTC
(
hide
)
Description:
Bug 14441: TrackClicks cuts off/breaks URLs (XSLT)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2016-03-24 21:02:08 UTC
Size:
9.26 KB
patch
obsolete
>From cac51131d30b6be97a6b3da9e3f9440d877bdf44 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 1 Mar 2016 12:13:22 +0000 >Subject: [PATCH] Bug 14441: TrackClicks cuts off/breaks URLs (XSLT) > >Same test plan as previous patch, but for opac defail and result using >the XSLT views. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >I am amazed! >--- > koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 5 +++-- > koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 9 +++++---- > koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl | 5 +++-- > .../opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl | 5 +++-- > 4 files changed, 14 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index 4cec982..20833ce 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -6,6 +6,7 @@ > xmlns:marc="http://www.loc.gov/MARC21/slim" > xmlns:items="http://www.koha-community.org/items" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:str="http://exslt.org/strings" > exclude-result-prefixes="marc items"> > <xsl:import href="MARC21slimUtils.xsl"/> > <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> >@@ -828,10 +829,10 @@ > <a property="url"> > <xsl:choose> > <xsl:when test="$OPACTrackClicks='track'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:when test="$OPACTrackClicks='anonymous'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> > <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 383ccb3..01e3c1c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -5,6 +5,7 @@ > xmlns:marc="http://www.loc.gov/MARC21/slim" > xmlns:items="http://www.koha-community.org/items" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:str="http://exslt.org/strings" > exclude-result-prefixes="marc items"> > <xsl:import href="MARC21slimUtils.xsl"/> > <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> >@@ -1020,10 +1021,10 @@ > <a> > <xsl:choose> > <xsl:when test="$OPACTrackClicks='track'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:when test="$OPACTrackClicks='anonymous'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> > <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >@@ -1055,10 +1056,10 @@ > <a target='_blank'> > <xsl:choose> > <xsl:when test="$OPACTrackClicks='track'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:when test="$OPACTrackClicks='anonymous'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> > <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >index 4d1785b..1f1e26c 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl >@@ -7,6 +7,7 @@ > xmlns:marc="http://www.loc.gov/MARC21/slim" > xmlns:items="http://www.koha-community.org/items" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:str="http://exslt.org/strings" > exclude-result-prefixes="marc items"> > <xsl:import href="NORMARCslimUtils.xsl"/> > <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> >@@ -488,10 +489,10 @@ > <a property="url"> > <xsl:choose> > <xsl:when test="$OPACTrackClicks='track'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:when test="$OPACTrackClicks='anonymous'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> > <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl >index 163b3aa..3cdcd0e 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl >@@ -7,6 +7,7 @@ > xmlns:marc="http://www.loc.gov/MARC21/slim" > xmlns:items="http://www.koha-community.org/items" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >+ xmlns:str="http://exslt.org/strings" > exclude-result-prefixes="marc items"> > <xsl:import href="NORMARCslimUtils.xsl"/> > <xsl:output method = "html" indent="yes" omit-xml-declaration = "yes" encoding="UTF-8"/> >@@ -793,10 +794,10 @@ > <a property="url"> > <xsl:choose> > <xsl:when test="$OPACTrackClicks='track'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:when test="$OPACTrackClicks='anonymous'"> >- <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="marc:subfield[@code='u']"/>;biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> >+ <xsl:attribute name="href">/cgi-bin/koha/tracklinks.pl?uri=<xsl:value-of select="str:encode-uri(marc:subfield[@code='u'], true())"/>&biblionumber=<xsl:value-of select="$biblionumber"/></xsl:attribute> > </xsl:when> > <xsl:otherwise> > <xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute> >-- >1.9.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 14441
:
48484
|
48485
|
48486
|
48501
|
48522
|
49556
| 49557