diff --git a/sgmlreaderdll/AssemblyInfo.cs b/sgmlreaderdll/AssemblyInfo.cs index 5c06f8f..018a548 100644 --- a/sgmlreaderdll/AssemblyInfo.cs +++ b/sgmlreaderdll/AssemblyInfo.cs @@ -50,8 +50,8 @@ // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("1.8.12")] -[assembly: AssemblyFileVersion("1.8.12")] +[assembly: AssemblyVersion("1.8.12.1")] +[assembly: AssemblyFileVersion("1.8.12.1")] // // In order to sign your assembly you must specify a key to use. Refer to the diff --git a/sgmlreaderdll/SgmlReader.cs b/sgmlreaderdll/SgmlReader.cs index 8c64913..ad48bd2 100644 --- a/sgmlreaderdll/SgmlReader.cs +++ b/sgmlreaderdll/SgmlReader.cs @@ -471,6 +471,12 @@ private void LazyLoadDtd(Uri baseUri) } } + // If DocType was specified explicitly, trust it. + if (this.m_dtd == null && this.m_ignoreDtd) + { + this.m_isHtml = StringUtilities.EqualsIgnoreCase(this.m_docType, "html"); + } + if (this.m_dtd != null && this.m_dtd.Name != null) { switch(this.CaseFolding) @@ -1417,9 +1423,9 @@ private void OpenInput() if (this.m_current.ResolvedUri != null) this.m_baseUri = this.m_current.ResolvedUri; - if (this.m_current.IsHtml && this.m_dtd == null) + if (this.m_current.IsHtml && this.m_dtd == null + && !StringUtilities.EqualsIgnoreCase(this.m_docType, "HTML")) // No need to reload DTD in case m_docType == "HTML" { - this.m_docType = "HTML"; LazyLoadDtd(this.m_baseUri); } }