Lines 198-204
EXPECTED
Link Here
|
198 |
}; |
198 |
}; |
199 |
|
199 |
|
200 |
subtest 'Use uri filter if needed' => sub { |
200 |
subtest 'Use uri filter if needed' => sub { |
201 |
plan tests => 3; |
201 |
plan tests => 4; |
202 |
my $input = <<INPUT; |
202 |
my $input = <<INPUT; |
203 |
<a href="tel:[% patron.phone %]">[% patron.phone %]</a> |
203 |
<a href="tel:[% patron.phone %]">[% patron.phone %]</a> |
204 |
<a href="mailto:[% patron.emailpro %]" title="[% patron.emailpro %]">[% patron.emailpro %]</a> |
204 |
<a href="mailto:[% patron.emailpro %]" title="[% patron.emailpro %]">[% patron.emailpro %]</a> |
Lines 208-213
subtest 'Use uri filter if needed' => sub {
Link Here
|
208 |
<a href="[% myuri | uri %]" title="[% myuri %]">[% myuri %]</a> |
208 |
<a href="[% myuri | uri %]" title="[% myuri %]">[% myuri %]</a> |
209 |
<a href="[% myurl | html %]" title="[% myurl %]">[% myurl %]</a> |
209 |
<a href="[% myurl | html %]" title="[% myurl %]">[% myurl %]</a> |
210 |
<a href="[% myurl | url %]" title="[% myurl %]">[% myurl %]</a> |
210 |
<a href="[% myurl | url %]" title="[% myurl %]">[% myurl %]</a> |
|
|
211 |
<a href="[% myurl | html_entity %]" title="[% myurl %]">[% myurl %]</a> |
211 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">[% another_var %]</a> |
212 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno %]">[% another_var %]</a> |
212 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno | html %]" title="[% a_title %]>[% another_var %]</a> |
213 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid %]&basketno=[% basketno | html %]" title="[% a_title %]>[% another_var %]</a> |
213 |
INPUT |
214 |
INPUT |
Lines 222-227
INPUT
Link Here
|
222 |
<a href="[% myuri | uri %]" title="[% myuri | html %]">[% myuri | html %]</a> |
223 |
<a href="[% myuri | uri %]" title="[% myuri | html %]">[% myuri | html %]</a> |
223 |
<a href="[% myurl | uri %]" title="[% myurl | html %]">[% myurl | html %]</a> |
224 |
<a href="[% myurl | uri %]" title="[% myurl | html %]">[% myurl | html %]</a> |
224 |
<a href="[% myurl | url %]" title="[% myurl | html %]">[% myurl | html %]</a> |
225 |
<a href="[% myurl | url %]" title="[% myurl | html %]">[% myurl | html %]</a> |
|
|
226 |
<a href="[% myurl | html_entity %]" title="[% myurl | html %]">[% myurl | html %]</a> |
225 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">[% another_var | html %]</a> |
227 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]">[% another_var | html %]</a> |
226 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" title="[% a_title | html %]>[% another_var | html %]</a> |
228 |
<a href="/cgi-bin/koha/acqui/newordersuggestion.pl?booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]" title="[% a_title | html %]>[% another_var | html %]</a> |
227 |
EXPECTED |
229 |
EXPECTED |
Lines 251-254
INPUT
Link Here
|
251 |
INPUT |
253 |
INPUT |
252 |
@missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
254 |
@missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
253 |
is_deeply( \@missing_filters, [], ); |
255 |
is_deeply( \@missing_filters, [], ); |
|
|
256 |
|
257 |
$input = <<INPUT; |
258 |
<a href="[% good_filter | html_entity %]">[% var | html %]</a> |
259 |
INPUT |
260 |
@missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
261 |
is_deeply( \@missing_filters, [], 'html_entity is a valid filter for href' ); |
254 |
}; |
262 |
}; |
255 |
- |
|
|