Htmlunit 2.6 stack overflows with some custom html tags. Wicket uses a number of tags outside of the html spec to specify where its templating engine should inject html. One of these tags is <wicket:body>.
When using HtmlUnit to load a page with a <wicket:body> tag that has content inside it, a StackOverflow occurs in DomNode.fireNodeAdded.
Obviously custom tags are not valid html, and in deployment mode of wicket the custom tags are removed. However (all?) browsers can parse and ignore tags that they do not know, so potentialy HtmlUnit should be doing this as well (it seems to do so for all the other wicket tags).
The stack trace is attached.
I have also attached an example html page that will cause the stack overflow.
Code to reproduce is to simply navigate to the page, i.e
new WebClient().getPage("http://localhost/test.html");
The problem only occurs when there is content inside the tag, for instance <wicket:body>a</wicket:body./> does not cause the problem. The problem occurs for text other than wicket, i.e <whatever:body>a</whatever:body>.
Interestingly the problem does not occur if you nest a body tag inside of another body tag, so it does not seem like HtmlUnit is confusing the <wicket:body> tag with a <body> tag.
example html
example stacktrace
Thanks for the tiny case
Fixed now in SVN