Bugzilla – Attachment 89586 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: Correctly filter the emails
Bug-22781-Correctly-filter-the-emails.patch (text/plain), 4.20 KB, created by
Katrin Fischer
on 2019-05-11 09:28:59 UTC
(
hide
)
Description:
Bug 22781: Correctly filter the emails
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2019-05-11 09:28:59 UTC
Size:
4.20 KB
patch
obsolete
>From 58c6db7cc18414d4496581dc2b7412786e979db7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 1 May 2019 21:05:30 -0400 >Subject: [PATCH] Bug 22781: Correctly filter the emails > >Ho, another bug! > >The email was not correctly filtered. > >Test plan: >Use the evil string for an email, do a search. >=> Notice that without this patch the results never show up > >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 | 2 +- > t/db_dependent/selenium/patrons_search.t | 7 ++++++- > 2 files changed, 7 insertions(+), 2 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 21853df433..2c047fd8f5 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 >@@ -17,7 +17,7 @@ > "dt_cardnumber": > "[% data.cardnumber | html | $To %]", > "dt_name": >- "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html %]'>[% data.email | html %]</a>[% END %]", >+ "<a href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=[% data.borrowernumber | html %]\" class=\"patron_preview\" data-borrowernumber=\"[% data.borrowernumber | html %]\" style='white-space:nowrap'>[% INCLUDE 'patron-title.inc' borrowernumber = data.borrowernumber category_type = data.category_type firstname = data.firstname surname = data.surname othernames = data.othernames invert_name = 1 | $To %]</a><br />[% INCLUDE escape_address data = data %][% IF data.email %]<br/>Email: <a href='mailto:[% data.email | html | $To %]'>[% data.email | html | $To %]</a>[% END %]", > "dt_dateofbirth": > "[% data.dateofbirth | $KohaDates %]", > "dt_category": >diff --git a/t/db_dependent/selenium/patrons_search.t b/t/db_dependent/selenium/patrons_search.t >index 5a27e2f116..fa5344d721 100644 >--- a/t/db_dependent/selenium/patrons_search.t >+++ b/t/db_dependent/selenium/patrons_search.t >@@ -40,7 +40,7 @@ my $builder = t::lib::TestBuilder->new; > > our @cleanup; > subtest 'Search patrons' => sub { >- plan tests => 5; >+ plan tests => 6; > > my @patrons; > my $borrowernotes = q|<strong>just 'a" note</strong> \123 â¤|; >@@ -48,6 +48,7 @@ subtest 'Search patrons' => sub { > 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 $email = q|a<strong>bad_email</strong>@example\123 â¤.com|; > my $patron_category = $builder->build_object( > { class => 'Koha::Patron::Categories', category_type => 'A' } ); > my $library = $builder->build_object( >@@ -65,6 +66,7 @@ subtest 'Search patrons' => sub { > branchcode => $library->branchcode, > borrowernotes => $borrowernotes, > address => $address, >+ email => $email, > } > } > ); >@@ -83,6 +85,9 @@ subtest 'Search patrons' => sub { > like ($td[2]->get_text, qr[\Q$address\E], > 'Column "Name" should be the 3rd and contain the address correctly filtered' > ); >+ like ($td[2]->get_text, qr[\Q$email\E], >+ 'Column "Name" should be the 3rd and contain the email 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