Subject: | Incorrect parsing of nested inline elements |
<p>normal <i>italic <b>bold italic</i> bold</b> normal</p>
renders using as_HTML as:
<p>normal <i>italic <b>bold italic</b></i> bold normal</p>
after parsing with HTML::TreeBuilder (note the missing bold tags after
the closing italic tag). Expected rendering is:
<p>normal <i>italic <b>bold italic</b></i><b> bold</b> normal</p>
or:
<p>normal <i>italic <b>bold italic</i> bold</b> normal</p>
The first rendering is preferred.
Subject: | noname1.pl |
use strict;
use warnings;
use HTML::TreeBuilder;
my $html = <<'HTML';
<p>normal <i>italic <b>bold italic</i> bold</b> normal</p>
HTML
my $root = HTML::TreeBuilder->new_from_content ($html);
print $root->as_HTML(undef, ' ', {});