[Koha-bugs] [Bug 16536] Warn about Template Toolkit directives inside HTML tags

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue May 17 16:28:13 CEST 2016


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16536

--- Comment #3 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
The "quick hack" is

diff --git a/xt/tt_valid.t b/xt/tt_valid.t
index 7285019..c335bb9 100755
--- a/xt/tt_valid.t
+++ b/xt/tt_valid.t
@@ -46,9 +46,12 @@ my $checkers = [
         description => 'TT syntax: not using TT directive within HTML tag',
         check => sub {
             my ($self, $name, $token) = @_;
+            push @{$self->{errors}->{$name}}, $token->{_lc} if exists
$token->{_string} and $token->{_string} =~ m|\[%\s*IF|;
             my $attr = $token->{_attr};
             next unless $attr;

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list