Bugzilla – Attachment 81983 Details for
Bug 21770
t::lib::QA::TemplateFilters should allow html_entity in href
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21770: Add tests for html_entity
Bug-21770-Add-tests-for-htmlentity.patch (text/plain), 2.47 KB, created by
Jonathan Druart
on 2018-11-06 14:04:39 UTC
(
hide
)
Description:
Bug 21770: Add tests for html_entity
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-11-06 14:04:39 UTC
Size:
2.47 KB
patch
obsolete
>From 50792ed612df2a73c6b72e83b63a771b9403d78c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Nov 2018 10:55:50 -0300 >Subject: [PATCH] Bug 21770: Add tests for html_entity > >--- > t/template_filters.t | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/t/template_filters.t b/t/template_filters.t >index 33e1af9510..be638e1c3c 100644 >--- a/t/template_filters.t >+++ b/t/template_filters.t >@@ -198,7 +198,7 @@ EXPECTED > }; > > subtest 'Use uri filter if needed' => sub { >- plan tests => 3; >+ plan tests => 4; > my $input = <<INPUT; > <a href="tel:[% patron.phone %]">[% patron.phone %]</a> > <a href="mailto:[% patron.emailpro %]" title="[% patron.emailpro %]">[% patron.emailpro %]</a> >@@ -208,6 +208,7 @@ subtest 'Use uri filter if needed' => sub { > <a href="[% myuri | uri %]" title="[% myuri %]">[% myuri %]</a> > <a href="[% myurl | html %]" title="[% myurl %]">[% myurl %]</a> > <a href="[% myurl | url %]" title="[% myurl %]">[% myurl %]</a> >+<a href="[% myurl | html_entity %]" title="[% myurl %]">[% myurl %]</a> > <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">[% another_var %]</a> > <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno | html %]" title="[% a_title %]>[% another_var %]</a> > INPUT >@@ -222,6 +223,7 @@ INPUT > <a href="[% myuri | uri %]" title="[% myuri | html %]">[% myuri | html %]</a> > <a href="[% myurl | uri %]" title="[% myurl | html %]">[% myurl | html %]</a> > <a href="[% myurl | url %]" title="[% myurl | html %]">[% myurl | html %]</a> >+<a href="[% myurl | html_entity %]" title="[% myurl | html %]">[% myurl | html %]</a> > <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">[% another_var | html %]</a> > <a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" title="[% a_title | html %]>[% another_var | html %]</a> > EXPECTED >@@ -251,4 +253,10 @@ INPUT > INPUT > @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); > is_deeply( \@missing_filters, [], ); >+ >+ $input = <<INPUT; >+<a href="[% good_filter | html_entity %]">[% var | html %]</a> >+INPUT >+ @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); >+ is_deeply( \@missing_filters, [], 'html_entity is a valid filter for href' ); > }; >-- >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 21770
:
81980
|
81983
|
81984
|
82008
|
82009
|
82010
|
82041
|
82042