From f6bb3eb4787ce2208347b3b066392ee1bf2432cf Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 15 Nov 2019 12:41:32 +0000 Subject: [PATCH] Bug 23290: Allow enabling expand_entities Since libxml2 disables it now by default, we need to enable it for testing. Signed-off-by: Marcel de Rooy Signed-off-by: David Cook Signed-off-by: Martin Renvoize --- Koha/XSLT/Security.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Koha/XSLT/Security.pm b/Koha/XSLT/Security.pm index 720c71c7fd..6c75458b02 100644 --- a/Koha/XSLT/Security.pm +++ b/Koha/XSLT/Security.pm @@ -144,8 +144,9 @@ sub set_parser_options { my $conf = $self->{_options}; return if !$conf; - if( exists $conf->{expand_entities} && $conf->{expand_entities} eq '0' ) { - # we only disable expanding, if we find an explicit 0 + if( $conf->{expand_entities} ) { + _set_option($parser, 'expand_entities', 1); + } else { _set_option($parser, 'expand_entities', 0); } } -- 2.39.5