Bugzilla – Attachment 92437 Details for
Bug 16111
RSS feed for OPAC search results has wrong content type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16111: Replace & with &
Bug-16111-Replace--with-amp.patch (text/plain), 4.23 KB, created by
Liz Rea
on 2019-08-22 14:38:39 UTC
(
hide
)
Description:
Bug 16111: Replace & with &
Filename:
MIME Type:
Creator:
Liz Rea
Created:
2019-08-22 14:38:39 UTC
Size:
4.23 KB
patch
obsolete
>From 993a306a8041541fd6d8832955d8b665b9305f6c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 19 Aug 2019 18:24:56 -0400 >Subject: [PATCH] Bug 16111: Replace & with & > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> >--- > C4/Search.pm | 6 +++--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt | 2 +- > opac/opac-search.pl | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 65f514498f..83451c1a57 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1808,9 +1808,9 @@ sub _build_initial_query { > #e.g. " and kw,wrdl:test" > $params->{query} .= $operator . $operand; > >- $params->{query_cgi} .= "&op=".uri_escape_utf8($operator) if $operator; >- $params->{query_cgi} .= "&idx=".uri_escape_utf8($params->{index}) if $params->{index}; >- $params->{query_cgi} .= "&q=".uri_escape_utf8($params->{original_operand}) if $params->{original_operand}; >+ $params->{query_cgi} .= "&op=".uri_escape_utf8($operator) if $operator; >+ $params->{query_cgi} .= "&idx=".uri_escape_utf8($params->{index}) if $params->{index}; >+ $params->{query_cgi} .= "&q=".uri_escape_utf8($params->{original_operand}) if $params->{original_operand}; > > #e.g. " and kw,wrdl: test" > $params->{query_desc} .= $operator . $params->{index_plus} . " " . $params->{original_operand}; >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >index 2267d4718b..5496dec0c5 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt >@@ -23,7 +23,7 @@ > xmlns:atom="http://www.w3.org/2005/Atom"> > <channel> > <title><![CDATA[[% LibraryName | html %] Search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %]]]></title> >- <link href=[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&format=rss</link> >+ <link>[% OPACBaseURL | html %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&format=rss</link> > <atom:link rel="self" type="application/rss+xml" href="[% OPACBaseURL | url %]/cgi-bin/koha/opac-search.pl?[% query_cgi | $raw %][% limit_cgi | $raw %]&sort_by=[% sort_by | uri %]&format=atom"/> > <description><![CDATA[ Search results [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %] at [% LibraryName | html %]]]></description> > <opensearch:totalResults>[% total | html %]</opensearch:totalResults> >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index 55fe17f006..450362d546 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -570,7 +570,7 @@ unless ( $cgi->param('advsearch') ) { > sub _input_cgi_parse { > my @elements; > my $query_cgi = shift or return @elements; >- for my $this_cgi ( split('&',$query_cgi) ) { >+ for my $this_cgi ( split('&',$query_cgi) ) { > next unless $this_cgi; > $this_cgi =~ /(.*?)=(.*)/; > push @elements, { input_name => $1, input_value => Encode::decode_utf8( uri_unescape($2) ) }; >@@ -608,7 +608,7 @@ my $results_hashref; > my @coins; > > if ($tag) { >- $query_cgi = "tag=" . uri_escape_utf8( $tag ) . "&" . $query_cgi; >+ $query_cgi = "tag=" . uri_escape_utf8( $tag ) . "&" . $query_cgi; > my $taglist = get_tags({term=>$tag, approved=>1}); > $results_hashref->{biblioserver}->{hits} = scalar (@$taglist); > my @marclist = map { C4::Biblio::GetXmlBiblio( $_->{biblionumber} ) } @$taglist; >@@ -745,7 +745,7 @@ for (my $i=0;$i<@servers;$i++) { > my $path_info = $cgi->url(-path_info=>1); > my $query_cgi_history = $cgi->url(-query=>1); > $query_cgi_history =~ s/^$path_info\?//; >- $query_cgi_history =~ s/;/&/g; >+ $query_cgi_history =~ s/;/&/g; > my $query_desc_history = join ", ", grep { defined $_ } $query_desc, $limit_desc; > > unless ( $borrowernumber ) { >-- >2.11.0
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 16111
:
49400
|
49587
|
49629
|
49837
|
76148
|
76160
|
76161
|
76162
|
77057
|
77058
|
77059
|
77060
|
78578
|
78579
|
78580
|
78581
|
78689
|
81285
|
81286
|
81287
|
81288
|
92050
|
92362
|
92363
|
92366
|
92435
|
92436
|
92437
|
92438
|
92439
|
92618
|
92619
|
92620
|
92621
|
92622
|
92623
|
92624