Bugzilla – Attachment 4275 Details for
Bug 5714
Unescaped ampersands in OPAC facets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Revised fix
0001-Fix-for-Bug-5714-Unescaped-ampersands-in-OPAC-facets.patch (text/plain), 4.53 KB, created by
Owen Leonard
on 2011-05-27 12:59:33 UTC
(
hide
)
Description:
Revised fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-05-27 12:59:33 UTC
Size:
4.53 KB
patch
obsolete
>From 8425f10662c28a9d1e8b5f8d8de4ba43a1c6d059 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 27 May 2011 08:54:06 -0400 >Subject: [PATCH] Fix for Bug 5714 - Unescaped ampersands in OPAC facets >Content-Type: text/plain; charset="utf-8" > >In the OPAC the "query_cgi" variable passed to the template >outputs a string like this: > >idx=kw&q=thing > >The ampersand is unescaped. Adding an "|html" filter to >the variable. Also correcting some TT markup which >added a new validation error (an unopened <div>). >--- > .../opac-tmpl/prog/en/includes/opac-facets.inc | 7 ++++--- > .../opac-tmpl/prog/en/modules/opac-results.tt | 2 +- > 2 files changed, 5 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >index eac00aa..4931283 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >+++ b/koha-tmpl/opac-tmpl/prog/en/includes/opac-facets.inc >@@ -2,8 +2,9 @@ > [% IF ( facets_loop ) %] > <div id="search-facets"> > <h4>Refine your search</h4> >+[% query_cgi %] > <ul> >- <li>Availability<ul><li>[% IF ( available ) %]Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Show all items</a>[% ELSE %]Limit to <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=available">currently available items.</a>[% END %]</li></ul> >+ <li>Availability<ul><li>[% IF ( available ) %]Showing only <strong>available</strong> items. <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi_not_availablity %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]">Show all items</a>[% ELSE %]Limit to <a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=available">currently available items.</a>[% END %]</li></ul> > [% IF ( related ) %] <li>(related searches: [% FOREACH relate IN related %][% relate.related_search %][% END %])</li>[% END %] > </li> > >@@ -18,8 +19,8 @@ > [% IF ( facets_loo.type_label_Libraries ) %]Libraries[% END %] > [% END %] > <ul> >- [% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a> [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]</li>[% END %][% IF ( facets_loo.expandable ) %] >- <li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&offset=[% facets_loo.offset %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li> >+ [% FOREACH facet IN facets_loo.facets %]<li><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&limit=[% facet.type_link_value %]:[% facet.facet_link_value %]" title="[% facet.facet_title_value |html %]">[% facet.facet_label_value %]</a> [% IF ( facet.displayFacetCount ) %]([% facet.facet_count %])[% END %]</li>[% END %][% IF ( facets_loo.expandable ) %] >+ <li class="showmore"><a href="/cgi-bin/koha/opac-search.pl?[% query_cgi |html %][% limit_cgi |html %][% IF ( sort_by ) %]&sort_by=[% sort_by %][% END %]&offset=[% facets_loo.offset %]&expand=[% facets_loo.expand %]#[% facets_loo.type_id %]">Show More</a></li> > [% END %] > </ul></li> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >index e08e31b..f371db1 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt >@@ -499,7 +499,7 @@ $(document).ready(function(){ > [% ELSIF ( loop.first ) %]<span class="tagstatus" id="login4tags">Log in to add tags.</span> > [% END %] > [% END %] >- [% IF ( SEARCH_RESULT.TagLoop ) %] >+ [% IF ( SEARCH_RESULT.TagLoop.size ) %] > </div>[% END %] > [% END %] > [% END %][% END %] >-- >1.7.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 5714
:
3095
|
4275
|
4289
|
4443