Subject: bug#73133: 29.2; EWW fails to render some webpages

From: Jim Porter <[email-masked]>
Date: Wed, 23 Oct 2024 11:51:32 -0700

On 10/23/2024 3:43 AM, Mattias Engdegård wrote:
> An exact translation of your regexp to the rx notation might be:
> 
>    (rx "<!doctype" (+ " ") "html" (* " ")
>        (group
>         (| ">"
>            (: "system" (+ " ") (+ (group (| "\"" "'")))
>               "about:legacy-compat"))))
> 
> but perhaps you meant something like
> 
>    (rx "<!doctype" (+ " ") "html"
>        (? (* " ") "system" (+ " ")
>           (| "\"" "'") "about:legacy-compat" (| "\"" "'"))
>        (* " ") ">")

Thoughts on just simplifying to checking for "<!doctype html"? That way, 
we'd also guess "text/html" for all the (mostly obsolete) HTML doctypes 
here: <https://www.w3.org/QA/2002/04/valid-dtd-list.html>.

(Technically the XHTML ones should be "application/xhtml+xml" but I 
don't think that makes any difference for EWW.)