15 lines
597 B
Diff
15 lines
597 B
Diff
diff -up ./lib/HTML/TreeBuilder/LibXML/Node.pm.orig ./lib/HTML/TreeBuilder/LibXML/Node.pm
|
|
--- ./lib/HTML/TreeBuilder/LibXML/Node.pm.orig 2021-06-14 17:00:06.781971373 +0200
|
|
+++ ./lib/HTML/TreeBuilder/LibXML/Node.pm 2021-06-14 17:02:22.456482166 +0200
|
|
@@ -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;
|
|
}
|
|
}
|
|
|
|
diff -up ./t/05_empty.t.orig ./t/05_empty.t
|