This project has moved and is read-only. For the latest updates, please go here.
1
Vote

HtmlAttribute.Value throws NullReferenceException when OwnerDocument.Text is null

description

  1. Create a new HtmlDocument
  2. Create an attribute using HtmlDocument.CreateAttribute(stirng)
  3. Access HtmlAttribute.Value
NullReferenceException is thrown. I guess there is similar problem on more places - e.g. document.DocumentNode.OuterText getter.

comments

Dzonny wrote Mar 12, 2013 at 4:40 PM

I guess fix to this particular issue is easy, add null check to the property getter.