This project has moved. For the latest updates, please go here.

LoadHtml throws StackOverflowException for HTML with big level of tag embedding


The LoadHtml() throws StackOverflowException when using an HTML with big level of embedding.

With the HAP sources I can see that exception is being thrown because of recursion in HtmlNode.SetChanged() method.

Is it a known issue?

Is there any workaround on this?

I know about the MaxDepthLevel option in HtmlDocument, but it doesn't seem to be checked during call to LoadHtml(). It is checked only on call to Descendants()...

file attachments


wittigdisco wrote Nov 18, 2016 at 8:20 PM

Also hitting the same issue where we get StackOverFlow exceptions despite having MaxDepthLevel set.

This is a huge pain.

wrote Dec 6, 2016 at 6:06 AM