summaryrefslogtreecommitdiff
path: root/LibXML.pm
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2022-07-25 08:44:28 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2022-07-25 08:44:28 +0900
commit386653a5f530a4e00811bacc50ae734d5610695d (patch)
treec6f6c4e3d74f202bd65a80e06992debe83e4e1ab /LibXML.pm
parentbed2f52e9348362135cc7cc4e6cedfe306744b20 (diff)
downloadperl-XML-LibXML-386653a5f530a4e00811bacc50ae734d5610695d.tar.gz
perl-XML-LibXML-386653a5f530a4e00811bacc50ae734d5610695d.tar.bz2
perl-XML-LibXML-386653a5f530a4e00811bacc50ae734d5610695d.zip
Imported Upstream version 2.0202upstream/2.0202
Diffstat (limited to 'LibXML.pm')
-rw-r--r--LibXML.pm15
1 files changed, 8 insertions, 7 deletions
diff --git a/LibXML.pm b/LibXML.pm
index 37ac162..b31d365 100644
--- a/LibXML.pm
+++ b/LibXML.pm
@@ -29,7 +29,7 @@ use XML::LibXML::XPathContext;
use IO::Handle; # for FH reads called as methods
BEGIN {
-$VERSION = "2.0201"; # VERSION TEMPLATE: DO NOT CHANGE
+$VERSION = "2.0202"; # VERSION TEMPLATE: DO NOT CHANGE
$ABI_VERSION = 2;
require Exporter;
require DynaLoader;
@@ -261,7 +261,7 @@ use constant {
HTML_PARSE_NOERROR => (1<<5), # suppress error reports
};
-$XML_LIBXML_PARSE_DEFAULTS = ( XML_PARSE_NODICT | XML_PARSE_DTDLOAD | XML_PARSE_NOENT );
+$XML_LIBXML_PARSE_DEFAULTS = ( XML_PARSE_NODICT );
# this hash is made global so that applications can add names for new
# libxml2 parser flags as temporary workaround
@@ -366,6 +366,7 @@ sub new {
}
# parser flags
$opts{no_blanks} = !$opts{keep_blanks} if exists($opts{keep_blanks}) and !exists($opts{no_blanks});
+ $opts{load_ext_dtd} = $opts{expand_entities} if exists($opts{expand_entities}) and !exists($opts{load_ext_dtd});
for (keys %OUR_FLAGS) {
$self->{$OUR_FLAGS{$_}} = delete $opts{$_};
@@ -2078,13 +2079,13 @@ sub new {
my $self = undef;
if ( defined $args{location} ) {
- $self = $class->parse_location( $args{location} );
+ $self = $class->parse_location( $args{location}, XML::LibXML->_parser_options(\%args), $args{recover} );
}
elsif ( defined $args{string} ) {
- $self = $class->parse_buffer( $args{string} );
+ $self = $class->parse_buffer( $args{string}, XML::LibXML->_parser_options(\%args), $args{recover} );
}
elsif ( defined $args{DOM} ) {
- $self = $class->parse_document( $args{DOM} );
+ $self = $class->parse_document( $args{DOM}, XML::LibXML->_parser_options(\%args), $args{recover} );
}
return $self;
@@ -2102,10 +2103,10 @@ sub new {
my $self = undef;
if ( defined $args{location} ) {
- $self = $class->parse_location( $args{location} );
+ $self = $class->parse_location( $args{location}, XML::LibXML->_parser_options(\%args), $args{recover} );
}
elsif ( defined $args{string} ) {
- $self = $class->parse_buffer( $args{string} );
+ $self = $class->parse_buffer( $args{string}, XML::LibXML->_parser_options(\%args), $args{recover} );
}
return $self;