Bugzilla – Attachment 89585 Details for
Bug 22781
Fields on patron search results should be html/json filtered
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22781: Does not double filter address
Bug-22781-Does-not-double-filter-address.patch (text/plain), 3.54 KB, created by
Katrin Fischer
on 2019-05-11 09:28:56 UTC
(
hide
)
Description:
Bug 22781: Does not double filter address
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-05-11 09:28:56 UTC
Size:
3.54 KB
patch
obsolete
>From 293409b8250d8e2b2d17dd49b2880ed1ace31583 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 May 2019 20:54:02 -0400 >Subject: [PATCH] Bug 22781: Does not double filter address > >Ho, a bug! >Some fields in the address where double filtered. > >Test plan: >Use the evil strings in the address field and do a search, you will see >double html encoded characters without this patch. > >Signed-off-by: Liz Rea <wizzyrea@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > .../prog/en/modules/members/tables/members_results.tt | 8 ++++---- > t/db_dependent/selenium/patrons_search.t | 7 ++++++- > 2 files changed, 10 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >index 0020f7511d..21853df433 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/tables/members_results.tt >@@ -42,8 +42,8 @@ > } > [% BLOCK escape_address %] > [%~ SET address = data.streetnumber _ ' ' %] >-[%~ IF data.streettype %][% address = address _ AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) _ ' ' | html %][% END %] >-[%~ IF data.address %][% address = address _ data.address _ ' ' | html %][% END %] >-[%~ IF data.address2 %][% address = address _ data.address2 _ ' ' | html %][% END %] >-[%~ To.json( address ) | $raw ~%] >+[%~ IF data.streettype %][% SET address = address _ AuthorisedValues.GetByCode( 'ROADTYPE', data.streettype ) _ ' ' %][% END %] >+[%~ IF data.address %][% SET address = address _ data.address _ ' ' %][% END %] >+[%~ IF data.address2 %][% SET address = address _ data.address2 _ ' ' %][% END %] >+[%~ address | html | $To ~%] > [% END %] >diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t >index 8ea5f869ca..5a27e2f116 100644 >--- a/t/db_dependent/selenium/patrons_search.t >+++ b/t/db_dependent/selenium/patrons_search.t >@@ -40,13 +40,14 @@ my $builder = t::lib::TestBuilder->new; > > our @cleanup; > subtest 'Search patrons' => sub { >- plan tests => 4; >+ plan tests => 5; > > my @patrons; > my $borrowernotes = q|<strong>just 'a" note</strong> \123 â¤|; > my $borrowernotes_displayed = q|just 'a" note \123 â¤|; > my $branchname = q|<strong>just 'another" library</strong> \123 â¤|; > my $firstname = q|<strong>fir's"tname</strong> \123 â¤|; >+ my $address = q|<strong>add'res"s</strong> \123 â¤|; > my $patron_category = $builder->build_object( > { class => 'Koha::Patron::Categories', category_type => 'A' } ); > my $library = $builder->build_object( >@@ -63,6 +64,7 @@ subtest 'Search patrons' => sub { > categorycode => $patron_category->categorycode, > branchcode => $library->branchcode, > borrowernotes => $borrowernotes, >+ address => $address, > } > } > ); >@@ -78,6 +80,9 @@ subtest 'Search patrons' => sub { > like ($td[2]->get_text, qr[\Q$firstname\E], > 'Column "Name" should be the 3rd and contain the firstname correctly filtered' > ); >+ like ($td[2]->get_text, qr[\Q$address\E], >+ 'Column "Name" should be the 3rd and contain the address correctly filtered' >+ ); > is( $td[5]->get_text, $branchname, > 'Column "Library" should be the 6th and contain the html tags - they have been html filtered' > ); >-- >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 22781
:
89267
|
89268
|
89269
|
89270
|
89271
|
89395
|
89396
|
89397
|
89398
|
89399
|
89582
|
89583
|
89584
| 89585 |
89586