Bug 29350: Don't need to escape the 'delete' TT methods

Will be needed by bug 22605.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit f99366a54e)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Jonathan Druart 2021-10-28 15:27:00 +02:00 committed by Fridolin Somers
parent 0b5eefb79a
commit 7e110c9172
2 changed files with 3 additions and 0 deletions

View File

@ -30,6 +30,7 @@ our @tt_directives = (
our @tt_methods = (
qr{\.push\(},
qr{\.delete\(},
);
sub fix_filters {

View File

@ -307,10 +307,12 @@ subtest 'Do not escape TT methods' => sub {
plan tests => 2;
my $input = <<INPUT;
[% my_array.push(a_var) %]
[% my_hash.delete(a_key) %]
INPUT
my $expected = <<EXPECTED;
[% my_array.push(a_var) %]
[% my_hash.delete(a_key) %]
EXPECTED
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input);