View | Details | Raw Unified | Return to bug 20975
Collapse All | Expand All

(-)a/C4/Templates.pm (+2 lines)
Lines 5-10 use warnings; Link Here
5
use Carp;
5
use Carp;
6
use CGI qw ( -utf8 );
6
use CGI qw ( -utf8 );
7
use List::MoreUtils qw/ any uniq /;
7
use List::MoreUtils qw/ any uniq /;
8
use Template::Stash::AutoEscaping;
8
9
9
# Copyright 2009 Chris Cormack and The Koha Dev Team
10
# Copyright 2009 Chris Cormack and The Koha Dev Team
10
#
11
#
Lines 72-77 sub new { Link Here
72
            COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '',
73
            COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '',
73
            INCLUDE_PATH => \@includes,
74
            INCLUDE_PATH => \@includes,
74
            FILTERS => {},
75
            FILTERS => {},
76
            STASH => Template::Stash::AutoEscaping->new,
75
            ENCODING => 'UTF-8',
77
            ENCODING => 'UTF-8',
76
        }
78
        }
77
    ) or die Template->error();
79
    ) or die Template->error();
(-)a/benchmark_AutoEscaping.pl (-1 / +1 lines)
Lines 31-37 __DATA__ Link Here
31
[% pouet %]
31
[% pouet %]
32
<div style="display:none;">
32
<div style="display:none;">
33
[% FOR l IN loop %]
33
[% FOR l IN loop %]
34
    [% l.foo %] [% l.bar %]
34
    [% l.foo | html %] [% l.bar | html %]
35
    <br/>
35
    <br/>
36
[% END %]
36
[% END %]
37
</div>
37
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt (+6 lines)
Lines 34-39 Link Here
34
                    </div><!-- /koha-news -->
34
                    </div><!-- /koha-news -->
35
                [% END %]
35
                [% END %]
36
            </div> <!-- /.col-sm-2 -->
36
            </div> <!-- /.col-sm-2 -->
37
            <div style="display:none;">
38
            [% FOR l IN loop %]
39
                [% l.foo %] [% l.bar %]
40
                <br/>
41
            [% END %]
42
            </div>
37
            <div class="col-sm-9">
43
            <div class="col-sm-9">
38
                <div class="row">
44
                <div class="row">
39
                    <div class="col-xs-6">
45
                    <div class="col-xs-6">
(-)a/mainpage.pl (-1 / +9 lines)
Lines 44-49 my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( Link Here
44
    }
44
    }
45
);
45
);
46
46
47
my @loop;
48
for my $i ( 0 .. 10000 ) {
49
    push @loop, {
50
        foo => 'my foo',
51
        bar => 'my bar',
52
    };
53
}
54
$template->param( loop => \@loop );
55
47
my $homebranch;
56
my $homebranch;
48
if (C4::Context->userenv) {
57
if (C4::Context->userenv) {
49
    $homebranch = C4::Context->userenv->{'branch'};
58
    $homebranch = C4::Context->userenv->{'branch'};
50
- 

Return to bug 20975