Bug 24605: Fix unencoded series link
authorNick Clemens <nick@bywatersolutions.com>
Thu, 6 Feb 2020 17:45:07 +0000 (17:45 +0000)
committerHayley Mapley <hayleymapley@catalyst.net.nz>
Tue, 14 Apr 2020 03:18:55 +0000 (15:18 +1200)
To test:
1 - Add an 830 to a record with a volume subfield separated by a semicolon
    830$aThe series ;$vvol 8.
2 - View the record in the opac
3 - Click the series link, no results
4 - View the link url - the semicolon is not encoded
5 - Apply patch
6 - link works
7 - URL is corrrectly encoded

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit e3cffae41f82fb22100bcf269696107cb102660e)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit e94543c454e1de6688f910515885757f1b467caf)

koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl

index b9249ee..5c31c3c 100644 (file)
                         </a>
                     </xsl:when>
                     <xsl:otherwise>
-                        <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
+                        <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=se,phr:"<xsl:value-of select="str:encode-uri(marc:subfield[@code='a'], true())"/>"</xsl:attribute>
                             <xsl:call-template name="chopPunctuation">
                                 <xsl:with-param name="chopString">
                                     <xsl:call-template name="subfieldSelect">