nested lists and OptionFixNestedTags

Topics: Developer Forum
May 19, 2008 at 12:46 PM
Hi all,

I'm loading a HTML file which looks like this:
<html>
<head>
    <ul>
        <li>a
            <ol>
                <li>b</li>
                <li>c</li>
                <li>d</li>
            </ol>
        </li>
    </ul>
</body>
</html>

After I've loaded it I look at the DocumentNode.OuterHtml, and it looks like this:
<html>
<head>
        <ul>
                <li>a
                        <ol>
                                </ol></li><li>b</li>
                                <li>c</li>
                                <li>d</li>


        </ul>

</head></html>

Had a look at the code, and noticed that loading a URL sets a property 'OptionFixNestedTags' to true, if I change this to false everything works.

Is there a problem with HtmlAgilityPack, or am I missing a setting somewhere?

Thanks,
Russ