[Bug 8783] New: Parentheses not escaped properly in queries when using XSLT
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783 Priority: P5 - low Change sponsored?: --- Bug ID: 8783 Assignee: gmcharlt@gmail.com Summary: Parentheses not escaped properly in queries when using XSLT Severity: normal Classification: Unclassified OS: All Reporter: kyle@bywatersolutions.com Hardware: All Status: NEW Version: master Component: Searching Product: Koha When XSLT is enabled, searching on subjects containing parentheses cause an error. The problem is the parens are not escaped properly, and so are interpreted as part of the query language, rather than the query string. For example, this query fails: (su:{Baggins, Frodo (Fictitious character)}) AND (su:{Fiction}) but this query works: (su:{Baggins, Frodo \(Fictitious character\)}) AND (su:{Fiction}) I think the problem is within the xslt template subfieldSelect. Interestingly, with XSLT off, each subject shows up as an individual link ( so one link for Frogo, and one link for Ficition ) whereas with XSLT on, they subjects are combined with an AND. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783 Nicole C. Engard <nengard@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=1807 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P3 Severity|normal |major -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783 --- Comment #1 from Kyle M Hall <kyle@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.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=6553 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8783 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |DUPLICATE --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- *** This bug has been marked as a duplicate of bug 9212 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org