Menu

#2 HTML5 doctype breaks processing

v1.0_(example)
open
nobody
None
1
2018-06-14
2018-06-14
No

The unit nicely precesses HTML4 doctype, like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
But simple HTML5 <!doctype html> breaks whole processing, because quote not found.
My quick fix in function THtmlReader.ReadDocumentType (unit HtmlReader):
if (FHtmlStr[FPosition]='"') or (FHtmlStr[FPosition]='''') then
if not ReadQuotedValue(FPublicID) then
Exit;

Was - without the first line:
if not ReadQuotedValue(FPublicID) then
Exit;

Discussion


Log in to post a comment.