Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Tomcat42
perl-HTML-TreeBuilder-LibXML
fix-05_empty.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-05_empty.patch of Package perl-HTML-TreeBuilder-LibXML
From d74d1f186b2e2c6334a78b895b0ea811a16617a4 Mon Sep 17 00:00:00 2001 From: Emmanuel Seyman <emmanuel@seyman.fr> Date: Mon, 14 Jun 2021 21:12:07 +0200 Subject: [PATCH] fallback to toString() when toStringC14N(1) gives an empty string --- lib/HTML/TreeBuilder/LibXML/Node.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/HTML/TreeBuilder/LibXML/Node.pm b/lib/HTML/TreeBuilder/LibXML/Node.pm index f3b4e81..b710dda 100644 --- a/lib/HTML/TreeBuilder/LibXML/Node.pm +++ b/lib/HTML/TreeBuilder/LibXML/Node.pm @@ -74,7 +74,8 @@ sub as_HTML { { local $@; # protect existing $@ my $output = eval { $_[0]->{node}->toStringC14N(1) }; - return $@ ? $_[0]->{node}->toString : $output; + return $_[0]->{node}->toString if ($@ or $output eq ''); + return $output; } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor