When traversing the DOM during SetChanged track the depth to avoid StackOverflowException
Pretty rough, sorry - just trying to highlight #499
Hello @johnkarbonhq ,
Thank you for the branch, my developer will look at it as well.
Hello @johnkarbonhq ,
As answered here; https://github.com/zzzprojects/html-agility-pack/issues/499
We currently cannot reproduce the issue with the example you provided. If you can provide an issue that this code fix, we will surely look at it again.
Best Regards,
Jon
Hello Jon,
I also faced this problem, with a HTML file that has some HTML parsing "traps". The file has a lot of information enclosed in angle brackets, which from a HTML perspective are opening tags. However these tags don't make sense, they are not HTML void elements, and with a large number of those in the HTML documents (>10K) you can reach the StackOverflowException.
I have attached a sample I created to reproduce the issue.
SetChanged-StackOverflowException-500.txt
Let me know if I can help,
Laurent
I have looked around the files and found the variable OptionMaxNestedChildNodes, which solved the problem for me. I'm not sure how this is different from _maxDepthLevel though ?
@johnkarbonhq Have you tried that ?