[Koha-bugs] [Bug 8783] Parentheses not escaped properly in queries when using XSLT

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Dec 4 16:02:13 CET 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783

--- Comment #1 from Kyle M Hall <kyle at bywatersolutions.com> ---
This works, but puts parens around every field visually. I think we need to
split the subfieldSelect template into subfieldSelectVisual and
subfieldSelectNonvisual ( or some naming along those lines ) with the quotes in
the nonvisual one, but not in the visual one. Alternatively, I think we could
pass an additional parameter in to add the quotes.

diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl
b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl
index df7c450..1852a56 100644
--- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl
+++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl
@@ -33,7 +33,7 @@
                     <xsl:if test="contains($subdivCodes, @code)">
                         <xsl:value-of select="$subdivDelimiter"/>
                     </xsl:if>
-                                       <xsl:value-of
select="$prefix"/><xsl:value-of select="text()"/><xsl:value-of
select="$suffix"/><xsl:value-of select="$delimeter"/>
+                                        <xsl:value-of
select="$prefix"/>"<xsl:value-of select="text()"/>"<xsl:value-of
select="$suffix"/><xsl:value-of select="$delimeter"/>
                                </xsl:if>
                        </xsl:for-each>
                </xsl:variable>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list