HtmlAgilityPack.HtmlWeb.GetContentTypeForExtension returns internal name

Topics: Developer Forum, Project Management Forum, User Forum
Dec 5, 2007 at 10:05 PM
Edited Dec 5, 2007 at 10:06 PM
Hello,

the function HtmlAgilityPack.HtmlWeb.GetContentTypeForExtension
returns the internal name inside the Registry instead of the ContentType.

Fix this by changing the following code in HtmlAgilityPack.HtmlWeb.cs :

contentType = (string)reg.GetValue("", def);

to

contentType = (string)reg.GetValue("Content Type", def);

in line 631.