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 <m.de.rooy@rijksmuseum.nl>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2019-11-15 12:41:32 +00:00 committed by Martin Renvoize
parent 7baa8d349c
commit f6bb3eb478
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -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);
}
}