Hi team,
I've encountered another issue regarding the tag balancing in HtmlUnit.
Given the sample HTML:
<ul>
<var data="fooBar">
<a href="#">A sample link</a>
<div>and a block</div>
<li>Sample list item</li>
</var>
</ul>
The tag balancer used in HtmlUnit (NekoHTML) produces:
<ul>
<var data="fooBar">
<a href="#">A sample link</a>
<div>and a block</div>
</var>
<li>
<var data="fooBar">
Sample list item
</var>
</li>
</ul>
This behavior is not consistent as the <div>, a block-level element, is allowed but the <li> is not, although it is just another block-level element.
Furthermore, modern browsers, at least FF 4, leave the structure intact.
Junit testcase
HTML resource file used by JUnit test
Hi Hartmut,
will have a look at this during the next days. But don't expect a fix for this week. We already have some patches for NekoHtml in the queue, but Marcs time is really limited at the moment.
So please be patient.
Thanks for pointing this out and as usual thanks for the testcase.
Diff:
I am seeing this bug as well. It may be a duplicate of https://sourceforge.net/p/htmlunit/bugs/1046/
Ok, this seems to be fixed at least with our own neko fork.
Tescase added.