To test:
If an author's name includes parentheses or other escape-characters, the tracing links
produced in the OPAC fail in XSLT mode. This patch wraps the author names
in double-quotes, providing the necessary escapement.
Test plan:
- Create a new framework, delete Thesaurus from 100 and other fields
- Create a new record in this framework (or change an existing record to this framework)
- Add 100$a - use parentheses
- Check the search links in OPAC detail pages
Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
XSLT change adding quotes. Search now matches search in the intranet.
Passes all tests.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
<a>
<xsl:choose>
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
<a>
<xsl:choose>
<xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:"<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
</xsl:when>
<xsl:otherwise>
</xsl:when>
<xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=au:"<xsl:value-of select="marc:subfield[@code='a']"/>"</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
</a>
<xsl:if test="marc:subfield[@code=9]">
<a class='authlink'>
</a>
<xsl:if test="marc:subfield[@code=9]">
<a class='authlink'>
- <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid=<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-authoritiesdetail.pl?authid="<xsl:value-of select="marc:subfield[@code=9]"/>"</xsl:attribute>
<img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/>
</a>
</xsl:if>
<img style="vertical-align:middle" height="15" width="15" src="/opac-tmpl/prog/images/filefind.png"/>
</a>
</xsl:if>