From be7ace59a751480621d4fc962d0aaf564ec66bbc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 23 Jan 2015 13:18:54 +0100 Subject: [PATCH] Bug 13618: [wip] Use Template::Stash::HTML::Entities to use the html filter Test plan: 0/ sudo cpanm Template::Stash::HTML::Entities 1/ Verify don't reproduce the XSS issue described on bug 13609. --- C4/Templates.pm | 2 ++ .../bootstrap/en/modules/opac-authoritiessearchresultlist.tt | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/C4/Templates.pm b/C4/Templates.pm index 5a5cbd0..4f055f7 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -5,6 +5,7 @@ use warnings; use Carp; use CGI qw ( -utf8 ); use List::MoreUtils qw/ any uniq /; +use Template::Stash::HTML::Entities; # Copyright 2009 Chris Cormack and The Koha Dev Team # @@ -69,6 +70,7 @@ sub new { COMPILE_DIR => $use_template_cache ? C4::Context->config('template_cache_dir') : '', INCLUDE_PATH => \@includes, FILTERS => {}, + STASH => Template::Stash::HTML::Entities->new, ENCODING => 'UTF-8', } ) or die Template->error(); diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt index eaef8b6..611d8cf 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt @@ -1,7 +1,7 @@ [% USE Koha %] [% PROCESS 'opac-authorities.inc' %] [% PROCESS 'authorities-search-results.inc' %] -[% pagination = BLOCK %] +[% BLOCK pagination %]