From a140843721de52477c6460ccca0c1bf0d0aafcfd Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Sat, 15 Sep 2018 01:32:07 +0300 Subject: [PATCH] Bug 14716: URI-encode URLs in NORMARC xsl templates. https://bugs.koha-community.org/show_bug.cgi?id=14716 Test plan: 1. Catalog a record with series name "Series & more" 2. Find the record 3. Make sure clicking the "Series & more" link works and the ampersand is properly encoded in the URL. Signed-off-by: Magnus Enger Works as advertised. Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens --- .../en/xslt/NORMARCslim2intranetDetail.xsl | 29 ++++++++++--------- .../en/xslt/NORMARCslim2intranetResults.xsl | 17 ++++++----- .../prog/en/xslt/NORMARCslimUtils.xsl | 7 +++-- .../en/xslt/NORMARCslim2OPACDetail.xsl | 28 +++++++++--------- .../en/xslt/NORMARCslim2OPACResults.xsl | 8 ++--- .../bootstrap/en/xslt/NORMARCslimUtils.xsl | 8 +++-- 6 files changed, 55 insertions(+), 42 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl index bf4af4b931..874f46ab98 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetDetail.xsl @@ -7,7 +7,8 @@ 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" - exclude-result-prefixes="marc items"> + xmlns:str="http://exslt.org/strings" + exclude-result-prefixes="marc items str"> @@ -108,7 +109,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au: + /cgi-bin/koha/catalogue/search.pl?q=au: @@ -123,7 +124,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au: + /cgi-bin/koha/catalogue/search.pl?q=au: @@ -137,7 +138,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au: + /cgi-bin/koha/catalogue/search.pl?q=au: @@ -170,8 +171,9 @@ Series: - - + + /cgi-bin/koha/catalogue/search.pl?q=se: + av @@ -184,7 +186,8 @@ - + + /cgi-bin/koha/catalogue/search.pl?q=se: @@ -205,10 +208,10 @@ - /cgi-bin/koha/catalogue/search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) + /cgi-bin/koha/catalogue/search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) - /cgi-bin/koha/catalogue/search.pl?q=Host-item: + /cgi-bin/koha/catalogue/search.pl?q=Host-item: Show analytics @@ -250,7 +253,7 @@ - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: + /cgi-bin/koha/catalogue/search.pl?q=ti,phr: @@ -418,7 +421,7 @@ - /cgi-bin/koha/catalogue/search.pl?q=su: + /cgi-bin/koha/catalogue/search.pl?q=su: @@ -537,7 +540,7 @@ a_t - /cgi-bin/koha/catalogue/search.pl?q= + /cgi-bin/koha/catalogue/search.pl?q= @@ -588,7 +591,7 @@ - /cgi-bin/koha/catalogue/search.pl?q= + /cgi-bin/koha/catalogue/search.pl?q= diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl index 3bcdd8bd22..9fff0a01ed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslim2intranetResults.xsl @@ -5,7 +5,8 @@ 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" - exclude-result-prefixes="marc items"> + xmlns:str="http://exslt.org/strings" + exclude-result-prefixes="marc items str"> @@ -308,7 +309,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au:"" + /cgi-bin/koha/catalogue/search.pl?q=au:"" @@ -323,7 +324,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au:"" + /cgi-bin/koha/catalogue/search.pl?q=au:"" @@ -345,7 +346,7 @@ /cgi-bin/koha/catalogue/search.pl?q=an: - /cgi-bin/koha/catalogue/search.pl?q=au:"" + /cgi-bin/koha/catalogue/search.pl?q=au:"" @@ -407,10 +408,10 @@ - /cgi-bin/koha/opac-search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) + /cgi-bin/koha/opac-search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) - /cgi-bin/koha/opac-search.pl?q=Host-item: + /cgi-bin/koha/opac-search.pl?q=Host-item: Show analytics @@ -452,10 +453,10 @@ - /cgi-bin/koha/catalogue/search.pl?q=ti,phr: + /cgi-bin/koha/catalogue/search.pl?q=ti,phr: - + diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl index 7d1400a2d0..458253de57 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/NORMARCslimUtils.xsl @@ -2,7 +2,10 @@ ]> - + @@ -227,7 +230,7 @@ - /cgi-bin/koha/opac-search.pl?q=: + /cgi-bin/koha/opac-search.pl?q=: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl index 1f1e26c8dd..917de68fb3 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACDetail.xsl @@ -8,7 +8,7 @@ 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"> + exclude-result-prefixes="marc items str"> @@ -104,7 +104,7 @@ /cgi-bin/koha/opac-search.pl?q=an: - /cgi-bin/koha/opac-search.pl?q=au: + /cgi-bin/koha/opac-search.pl?q=au: @@ -130,7 +130,7 @@ /cgi-bin/koha/opac-search.pl?q=an: - /cgi-bin/koha/opac-search.pl?q=au: + /cgi-bin/koha/opac-search.pl?q=au: @@ -155,7 +155,7 @@ /cgi-bin/koha/opac-search.pl?q=an: - /cgi-bin/koha/opac-search.pl?q=au: + /cgi-bin/koha/opac-search.pl?q=au: @@ -200,8 +200,9 @@ Series: - - + + /cgi-bin/koha/opac-search.pl?q=se: + av @@ -214,7 +215,8 @@ - + + /cgi-bin/koha/opac-search.pl?q=se: @@ -235,10 +237,10 @@ - /cgi-bin/koha/opac-search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) + /cgi-bin/koha/opac-search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) - /cgi-bin/koha/opac-search.pl?q=Host-item: + /cgi-bin/koha/opac-search.pl?q=Host-item: Show analytics @@ -280,7 +282,7 @@ - /cgi-bin/koha/opac-search.pl?q=ti,phr: + /cgi-bin/koha/opac-search.pl?q=ti,phr: @@ -448,7 +450,7 @@ - /cgi-bin/koha/opac-search.pl?q=su: + /cgi-bin/koha/opac-search.pl?q=su: @@ -600,7 +602,7 @@ a_t - /cgi-bin/koha/opac-search.pl?q= + /cgi-bin/koha/opac-search.pl?q= @@ -651,7 +653,7 @@ - /cgi-bin/koha/opac-search.pl?q= + /cgi-bin/koha/opac-search.pl?q= diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl index 3cdcd0e4a1..b1391463d0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslim2OPACResults.xsl @@ -8,7 +8,7 @@ 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"> + exclude-result-prefixes="marc items str"> @@ -396,10 +396,10 @@ - /cgi-bin/koha/opac-search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) + /cgi-bin/koha/opac-search.pl?q=rcn:+and+(bib-level:a+or+bib-level:b) - /cgi-bin/koha/opac-search.pl?q=Host-item: + /cgi-bin/koha/opac-search.pl?q=Host-item: Show analytics @@ -441,7 +441,7 @@ - /cgi-bin/koha/opac-search.pl?q=ti,phr: + /cgi-bin/koha/opac-search.pl?q=ti,phr: diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl index cb7d18ff27..403087a8d8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl +++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/NORMARCslimUtils.xsl @@ -1,6 +1,10 @@ ]> - + @@ -223,7 +227,7 @@ - /cgi-bin/koha/opac-search.pl?q=: + /cgi-bin/koha/opac-search.pl?q=: -- 2.39.5