Hi,
On Sat, Apr 20, 2024 at 02:00:05PM +1000, Kevin Koster wrote:
This problem was present in 3.0.5 as well as in 3.1.0-rc1.
URL: http://www.lemis.com/
CSS: enabled or disabled
Summary: Won't render HTML with comments before <!DOCTYPE>.
Pages on this website aren't rendered, just displayed as source code.
Although they are XHTML, this doesn't appear to be due to this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1036382
If I save the file as lemis.xhtml and remove the two comment lines
before the <!DOCTYPE> declaration, then it renders when I load it with
file:// or http://, otherwise it doesn't.
My reading is that comments there are valid for HTML 4 (which is
declared in the page's <!DOCTYPE>) since the standard says:
White space (spaces, newlines, tabs, and comments) may appear before or
after each section.
https://www.w3.org/TR/html401/struct/global.html#h-7.1
Yeah, the current detection mechanism in Dillo for content types is not
very good. It searches for the doctype line at the beginning of the
document[1] but it doesn't handle comments.
[1]:https://github.com/dillo-browser/dillo/blob/v3.1.0-rc1/src/misc.c#L148
We should rely on the Content-Type provided by the server, or at least
improve the detection.
Best,
Rodrigo.
_______________________________________________
Dillo-dev mailing list -- dillo-dev@mailman3.com
To unsubscribe send an email to dillo-dev-le...@mailman3.com