From bugzilla-daemon@bugs.koha-community.org Mon Mar 9 20:55:40 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] New: Facet links broken when shelf location
limit is used.
Date: Mon, 09 Mar 2015 19:55:36 +0000
Message-ID:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3284960850367367981=="
--===============3284960850367367981==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13812
Bug ID: 13812
Summary: Facet links broken when shelf location limit is used.
Change sponsored?: ---
Product: Koha
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Searching
Assignee: gmcharlt@gmail.com
Reporter: barton@bywatersolutions.com
QA Contact: testopia@bugs.koha-community.org
This bug is analogous to Bug 13442, but it affects shelf location rather than
collection code:
Limiting a search by shelf location is broken, because it wraps double-quotes
around the "value" part of the key-value pair in the URL. This breaks the hre=
f=3D
part of the anchor tag.
The anchor tag generated for the shelf location faced is
Paetro, Maxine,
Once again, double-quotes inside the URL are causing a premature close of the
href, which results in a broken link.
I think that we need to take a look for code duplication inside
C4::Search::buildQuery -- if there's more than one section of code where we're
wrapping quotes around the 'value' part of the query, these should be
consolidated -- shouldn't we be using URL encoding for URL reserved characters
anyway?
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============3284960850367367981==--
From bugzilla-daemon@bugs.koha-community.org Mon Mar 9 20:56:38 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject:
[Koha-bugs] [Bug 13812] Facet links broken when shelf location limit is used.
Date: Mon, 09 Mar 2015 19:56:36 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8125410051335043367=="
--===============8125410051335043367==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13812
Barton Chittenden changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |http://bugs.koha-community.
| |org/bugzilla3/show_bug.cgi?
| |id=13442
--
You are receiving this mail because:
You are watching all bug changes.
--===============8125410051335043367==--
From bugzilla-daemon@bugs.koha-community.org Wed Mar 18 17:39:12 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Wed, 18 Mar 2015 16:39:09 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5840984590973946136=="
--===============5840984590973946136==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13812
Barton Chittenden changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Facet links broken when |Facet links broken because
|shelf location limit is |double-quotes are not URL
|used. |encoded.
--- Comment #1 from Barton Chittenden ---
(In reply to Barton Chittenden from comment #0)
> This bug is analogous to Bug 13442, but it affects shelf location rather
> than collection code:
>=20
> Limiting a search by shelf location is broken, because it wraps
> double-quotes around the "value" part of the key-value pair in the URL. This
> breaks the href=3D part of the anchor tag.
>=20
> The anchor tag generated for the shelf location faced is
>=20
> href=3D"/cgi-bin/koha/opac-search.pl?&limit=3Dmc-loc%3A"100100ADFICCF"&limi=
t=3Dmc-
> loc%3A"100200ADFIC"&limit=3Dmc-loc%3A"100250ADFICGN"&limit=3Dmc-
> loc%3A"100300ADFICHF"&limit=3Dyr%2Cst-numeric%3D2014-&
> sort_by=3Dacqdate_dsc&limit=3Dau:Paetro%2C%20Maxine%2C" title=3D"Paetro,
> Maxine,">Paetro, Maxine,
>=20
> Once again, double-quotes inside the URL are causing a premature close of
> the href, which results in a broken link.
>=20
> I think that we need to take a look for code duplication inside
> C4::Search::buildQuery -- if there's more than one section of code where
> we're wrapping quotes around the 'value' part of the query, these should be
> consolidated -- shouldn't we be using URL encoding for URL reserved
> characters anyway?
I found another example, this time in facets under Subject:
Starting here:
https://library.roseville.ca.us/cgi-bin/koha/opac-detail.pl?biblionumber=3D35=
767&query_desc=3Dkw%2Cwrdl%3A%20Fairies
Click on Subject: Faries ... this leads us here:
https://library.roseville.ca.us/cgi-bin/koha/opac-search.pl?q=3Dsu:"Fairies."
All of the facets on this page are broken, because the quotes are passed
straight in, without being URL encoded. Here's an example from the HTML of th=
at
page:
Magic
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============5840984590973946136==--
From bugzilla-daemon@bugs.koha-community.org Wed Mar 18 17:42:54 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Wed, 18 Mar 2015 16:42:51 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============3203686450614645890=="
--===============3203686450614645890==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13812
jdemuth@roseville.ca.us changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jdemuth@roseville.ca.us
--
You are receiving this mail because:
You are watching all bug changes.
--===============3203686450614645890==--
From bugzilla-daemon@bugs.koha-community.org Wed Mar 18 19:51:27 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Wed, 18 Mar 2015 18:51:24 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============5529500526612646179=="
--===============5529500526612646179==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13812
Nicole C. Engard changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nengard@gmail.com
Severity|enhancement |normal
Version|unspecified |master
--
You are receiving this mail because:
You are watching all bug changes.
--===============5529500526612646179==--
From bugzilla-daemon@bugs.koha-community.org Mon Apr 6 14:58:19 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Mon, 06 Apr 2015 12:58:16 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============4690353298361571736=="
--===============4690353298361571736==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13812
--- Comment #2 from Kyle M Hall ---
Created attachment 37528
-->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=3D37528&action=3De=
dit
Bug 13812 - Facet links broken because double-quotes are not URL encoded.
This bug is analogous to Bug 13442, but it affects shelf location rather than
collection code:
Limiting a search by shelf location is broken, because it wraps double-quotes
around the "value" part of the key-value pair in the URL. This breaks the hre=
f=3D
part of the anchor tag.
The anchor tag generated for the shelf location faced is
Paetro, Maxine,
Once again, double-quotes inside the URL are causing a premature close of the
href, which results in a broken link.
http://bugs.koha-community.org/show_bug.cgi?id=3D13821
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============4690353298361571736==--
From bugzilla-daemon@bugs.koha-community.org Mon Apr 6 15:02:44 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Mon, 06 Apr 2015 13:02:41 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============8895396148994805298=="
--===============8895396148994805298==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13812
Kyle M Hall changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kyle@bywatersolutions.com
Status|NEW |Needs Signoff
--- Comment #3 from Kyle M Hall ---
Patch removes quotes. Another possibility would be to escape or encode the
quotes, but I'm not well versed enough with the XSLT to do so.
--
You are receiving this mail because:
You are watching all bug changes.
--===============8895396148994805298==--
From bugzilla-daemon@bugs.koha-community.org Tue Apr 7 01:31:10 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Mon, 06 Apr 2015 23:31:05 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1707510270390282393=="
--===============1707510270390282393==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13812
David Cook changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcook@prosentient.com.au
--- Comment #4 from David Cook ---
(In reply to Kyle M Hall from comment #3)
> Patch removes quotes. Another possibility would be to escape or encode the
> quotes, but I'm not well versed enough with the XSLT to do so.
We could register an extension function with XML::LibXSLT, using
XML::LibXSLT::register_function(), that allows us to escape or encode quotes.
While I think XSLT 2.0 has a uri encoding function, XSLT 1.0 doesn't, so
extension functions have to be used.
I thought about adding this to the XSLT handler, but it's a global option, so
we can just set it after "use XML::LibXSLT" to make the extension function
available. (I wonder a bit about the repercussions while using Plack, but I
don't yet know enough about Plack to really speculate on that one. I suppose =
it
depends on the scope in which XML::LibXSLT is loaded.)
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============1707510270390282393==--
From bugzilla-daemon@bugs.koha-community.org Thu Apr 16 21:33:46 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Thu, 16 Apr 2015 19:33:43 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============9112289928377185912=="
--===============9112289928377185912==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13812
Nick Clemens changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Needs Signoff |In Discussion
CC| |nick@quecheelibrary.org
--- Comment #5 from Nick Clemens ---
Is tis still valid on master? I can't recreate, could use a test plan.
--
You are receiving this mail because:
You are watching all bug changes.
--===============9112289928377185912==--
From bugzilla-daemon@bugs.koha-community.org Tue Apr 21 03:41:05 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Tue, 21 Apr 2015 01:41:01 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0568487432706625065=="
--===============0568487432706625065==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D13812
--- Comment #6 from David Cook ---
I can't reproduce this on master either. It looks like the problem caused by:
https://library.roseville.ca.us/cgi-bin/koha/opac-search.pl?q=3Dsu:%22Fairies=
.%22
is specific to either 3.16.4 or a modification that Bywater have made to that
Koha instance.
Here's a link that I see in the Roseville site for the query
https://library.roseville.ca.us/cgi-bin/koha/opac-search.pl?q=3Dsu:%22Fairies=
.%22:
Colfer, Eoin.
However, my query for
http://192.168.1.61:2112/cgi-bin/koha/catalogue/search.pl?q=3Dsu:%22Fairies.%=
22
creates the following link:
test
I suspect that the following line in C4::Search::buildQuery() was added after
3.16.4:
$limit_cgi .=3D "&limit=3D" . uri_escape_utf8($this_limit);
Although it looks like the Roseville site is also doing something with
lowercasing and possibly whitespace as well...
---
I suspect that the current patch might cause problems if it's used since it
removes the TracingQuotesLeft and TracingQuotesRight, which are { and } with
ICU, and only " and " with non-ICU.
In any case, this doesn't appear to be a problem in master.
--=20
You are receiving this mail because:
You are watching all bug changes.
--===============0568487432706625065==--
From bugzilla-daemon@bugs.koha-community.org Tue Aug 25 23:30:49 2015
From: bugzilla-daemon@bugs.koha-community.org
To: koha-bugs@lists.koha-community.org
Subject: [Koha-bugs] [Bug 13812] Facet links broken because double-quotes are
not URL encoded.
Date: Tue, 25 Aug 2015 21:30:45 +0000
Message-ID:
In-Reply-To:
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="===============1324435383976822031=="
--===============1324435383976822031==
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13812
Heather Braum changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hbraum@nekls.org
--
You are receiving this mail because:
You are watching all bug changes.
--===============1324435383976822031==--