From 0a56c3005e8b003f263c5e657de71da52e8eae9d Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 6 Dec 2018 10:07:18 -0300 Subject: [PATCH] Bug 21950: Remove filtering for query_cgi and limit_cgi MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We must not escape query_cgi and limit_cgi template-side, they are already escape properly from build_query_compat using uri_escape_utf8. To fix further problems we should replace all occurrences to make things clear (I decided to keep the html filter so far, which did not hurt, but uri or url do) Same patch as the following commit will be provided commit 2fc599c0893620c395ca0492c9d9e3c860c8f951 Bug 21526: Fix search result pages (url vs uri vs raw) query_cgi is uri_escaped from the pl, so we should displayed as raw Test plan: Use wide characters ❤ Search, filter, facets, search history, rss (both interfaces) Signed-off-by: Owen Leonard Signed-off-by: Martin Renvoize Signed-off-by: Nick Clemens (cherry picked from commit 3a7053346c760144a8d7fe595d52806f739ead64) Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc | 2 +- .../intranet-tmpl/prog/en/includes/page-numbers.inc | 10 +++++----- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 6 +++--- .../prog/en/modules/catalogue/search-history.tt | 8 ++++---- .../opac-tmpl/bootstrap/en/includes/opac-facets.inc | 4 ++-- .../opac-tmpl/bootstrap/en/includes/page-numbers.inc | 10 +++++----- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 +++--- .../bootstrap/en/modules/opac-search-history.tt | 8 ++++---- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc index e3795e7e90..4d0e3c4781 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/facets.inc @@ -5,7 +5,7 @@

Refine your search

    -
  • Availability +
  • Availability [% IF ( related ) %]
  • (related searches: [% FOREACH relate IN related %][% relate.related_search | html %][% END %])
  • [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc index 77af4948b4..6ea10c1240 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/page-numbers.inc @@ -1,19 +1,19 @@ [% IF ( PAGE_NUMBERS ) %][% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 3f14e6ea06..7c722b64ac 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -599,7 +599,7 @@ [% IF ( outer_sup_results_loo.inner_sup_results_loop ) %] [% outer_sup_results_loo.servername | html %] [% FOREACH inner_sup_results_loo IN outer_sup_results_loo.inner_sup_results_loop %] - + [% END %] [% END %] @@ -742,7 +742,7 @@ [%- END -%] ]; var browser = KOHA.browser('[% searchid | html %]', parseInt('[% biblionumber | html %]', 10)); - browser.create([% SEARCH_RESULTS.first.result_number | html %], '[% query_cgi | html %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]', + browser.create([% SEARCH_RESULTS.first.result_number | html %], '[% query_cgi | html %]', '[% limit_cgi | html %]','[% sort_cgi | html %]', newresults, '[% total | html %]'); [% END %] @@ -875,7 +875,7 @@ var bibnums = getContextBiblioNumbers(); if ( bibnums && bibnums.length > 0 ) { var browser = KOHA.browser('', parseInt('[% biblionumber | html %]', 10)); - browser.create(1, '[% query_cgi | html %]', '[% limit_cgi | uri %]','[% sort_cgi | uri %]', bibnums, bibnums.length); + browser.create(1, '[% query_cgi | html %]', '[% limit_cgi | html %]','[% sort_cgi | html %]', bibnums, bibnums.length); window.location = '/cgi-bin/koha/catalogue/detail.pl?biblionumber=' + bibnums[0] + '&searchid='+browser.searchid; } else { alert(MSG_NO_ITEM_SELECTED); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt index 8d8688cbaa..389d8f95b2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt @@ -57,7 +57,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - [% s.query_desc | html %] + [% s.query_desc | html %] [% s.total | html %] [% END %] @@ -94,7 +94,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - [% s.query_desc | html %] + [% s.query_desc | html %] [% s.total | html %] [% END %] @@ -137,7 +137,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - [% s.query_desc | html %] + [% s.query_desc | html %] [% s.total | html %] [% END %] @@ -174,7 +174,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - [% s.query_desc | html %] + [% s.query_desc | html %] [% s.total | html %] [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc index 9ca89a6b7e..c840b2ddaf 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-facets.inc @@ -8,9 +8,9 @@ diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc index 1a63f2fe28..ed86550b5f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/page-numbers.inc @@ -3,19 +3,19 @@ [% IF hits_to_paginate < total %]
    [% hits_to_paginate | html %] of [% total | html %] results loaded, refine your search to view other records
    [% END %]
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 7a490d96fa..548c0c055c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -20,7 +20,7 @@ [% END %] [% END %] - + [% INCLUDE 'bodytag.inc' bodyid='results' bodyclass='scrollto' %] @@ -45,7 +45,7 @@ No results found!

[% IF ( searchdesc ) %] - No results found for that in [% LibraryName | html %] catalog. Subscribe to this search + No results found for that in [% LibraryName | html %] catalog. Subscribe to this search [% ELSE %] You did not specify any search criteria. [% END %] @@ -89,7 +89,7 @@ [% END %] ). [% END %] - Subscribe to this search + Subscribe to this search [% END # / IF total %]

[% END # / IF searchdesc %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt index 0458cb669f..cb1277ee73 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt @@ -71,7 +71,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - Subscribe to this search [% s.query_desc | html %] + Subscribe to this search [% s.query_desc | html %] [% s.total | html %] [% END %] @@ -111,7 +111,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - Subscribe to this search [% s.query_desc | html %] + Subscribe to this search [% s.query_desc | html %] [% s.total | html %] [% END %] @@ -156,7 +156,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - [% s.query_desc | html %] + [% s.query_desc | html %] [% s.total | html %] [% END %] @@ -193,7 +193,7 @@ [% s.time |$KohaDates with_hours => 1 | html %] - [% s.query_desc | html %] + [% s.query_desc | html %] [% s.total | html %] [% END %] -- 2.39.5