From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= Newsgroups: gmane.emacs.bugs Subject: bug#73133: 29.2; EWW fails to render some webpages Date: Wed, 30 Oct 2024 11:21:32 -0400 Message-ID: References: <86613F3D-B7C8-4498-B435-7AAF342264C2@gmail.com> <2eb287fc-b73e-f7d0-ed5d-fa52063224e8@gmail.com> <87zfmufa1g.fsf@sebasmonia.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Jim Porter , Eli Zaretskii , 73133@debbugs.gnu.org, ganimard@tuta.io To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Oct 30 16:22:22 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t6AWY-0003Gx-OI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Oct 2024 16:22:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6AWJ-0003In-Q1; Wed, 30 Oct 2024 11:22:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6AWI-0003IP-NR for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 11:22:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6AWI-0001hp-F2 for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 11:22:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=I/REea2RN5GsCShyCfjbSYpTVhl5ZMmn7NPmkCTI4zw=; b=J9uRkjjbDVP0ale2mbRiJ1onyi5wpDoAzVXgfe9xpyI4ZoYNn0bEnhmzzOTgsve1nKOGMPwS1dm2vNhCblGr+Zzd0fKb1Rwh75JBkV88MHc5UPQ1OmVqb16iCHmw/tbldBezu3vI2QnmlpmZnXXBBjhbnKhSteeKSgLFc82l8yXKU2xsMOLWv2PZ5v3Bq87pfXVPKCaVLBRVuhURecolPd0NR2b1GFnjCFlQRnNTtBMi99XvlN70kbZxEpUGF5bxhmIQL6vUmgk2Ee2SCXUP7H1k1Bg6kdbZRWjJ8N2uAUf+UIucGWII9qYHW2oLJfDLR2+onKfWhvXDPx8W1/ozHA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6AWI-0005k5-9h for bug-gnu-emacs@gnu.org; Wed, 30 Oct 2024 11:22:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?Sebasti=C3=A1n_?= =?UTF-8?Q?Mon=C3=ADa?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Oct 2024 15:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73133 X-GNU-PR-Package: emacs Original-Received: via spool by 73133-submit@debbugs.gnu.org id=B73133.173030170322060 (code B ref 73133); Wed, 30 Oct 2024 15:22:02 +0000 Original-Received: (at 73133) by debbugs.gnu.org; 30 Oct 2024 15:21:43 +0000 Original-Received: from localhost ([127.0.0.1]:35630 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6AVz-0005jk-9z for submit@debbugs.gnu.org; Wed, 30 Oct 2024 11:21:43 -0400 Original-Received: from fhigh-b2-smtp.messagingengine.com ([202.12.124.153]:56063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6AVu-0005ja-VA for 73133@debbugs.gnu.org; Wed, 30 Oct 2024 11:21:41 -0400 Original-Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfhigh.stl.internal (Postfix) with ESMTP id 9A74E25400C0; Wed, 30 Oct 2024 11:21:33 -0400 (EDT) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Wed, 30 Oct 2024 11:21:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sebasmonia.com; h=cc:cc:content-type:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1730301693; x= 1730388093; bh=I/REea2RN5GsCShyCfjbSYpTVhl5ZMmn7NPmkCTI4zw=; b=T P0sJcZaPtlrPIOY4KjaA//XRYfg7iiSVL/h9X61GyaPxScsncgW8i+H4+/F2t+7W m2BsdG1QM3e9rodDWG8KzSNLLIzyCAFADLRpwRG5lN3oeOCKJAt0vV89MwQ3TEbg WB3mqIeTMw0cKEdhz4uGgPK/4UKweQn94SSZPAZHC5DEQANsDNu/1HiPY2cBIAwQ di0NSWsIw4DDv+2ejI4jRJSPwsdn+p7w4taGxx1DdFc6mFFTcMdGAcWwPCrGrBD6 zk5B1HKjlDl722KbFunYBhuPfJTAz7GK5e4m7/u2hVoB9ymg5321pVZORTGMkOsy 4+qKiRY3Pna4RbM3hCECA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1730301693; x=1730388093; bh=I/REea2RN5GsCShyCfjbSYpTVhl5ZMmn7NP mkCTI4zw=; b=UQNJ6/Fnc3+1DgfN1/cs4HXccd3AGaOHVHP7z92cSn6jsuAdFu3 u1oWqn8t/dkaH3HXtpn9aMfZMaa5cHWRpnKfMcvu14o8/KkIYezeYQvY6FO+sZwY jxlboB+gwCLAL0UyfyHeoVM4djXAuvw7g0wmL2Tj7aqV1jmb3SEncFJMvqXxVv7G z9tpipTNKR8uy2wVAnF/Jwb2j25GnPdpw7D7z2QrO15TRbRo2FpY6fbDy6A/vYTH d6jeHOEbC8FA1BZlN6EcaduMWaaOTheKxuuMbNVrb7uFbJsHS2ZHA4ELFm9H2/E5 4w/J6NjpjAZHRI8fnBt46iMwFZgondgg0qA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdekfedgjeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefujghffgffkfggtgesmhdtofertderuden ucfhrhhomhepufgvsggrshhtihojnhcuofhonhovrgcuoehsvggsrghsthhirghnsehsvg gsrghsmhhonhhirgdrtghomheqnecuggftrfgrthhtvghrnhepkeduffejhffhuddutdej tdeugfetkeekuddvieefieehueejjeegkeduvdefkeelnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepshgvsggrshhtihgrnhesshgvsggrshhm ohhnihgrrdgtohhmpdhnsggprhgtphhtthhopeehpdhmohguvgepshhmthhpohhuthdprh gtphhtthhopehgrghnihhmrghrugesthhuthgrrdhiohdprhgtphhtthhopeejfedufeef seguvggssghughhsrdhgnhhurdhorhhgpdhrtghpthhtohepvghlihiisehgnhhurdhorh hgpdhrtghpthhtohepjhhpohhrthgvrhgsuhhgshesghhmrghilhdrtghomhdprhgtphht thhopehmrghtthhirg X-ME-Proxy: Feedback-ID: iab2c46da:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 30 Oct 2024 11:21:32 -0400 (EDT) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Mon, 28 Oct 2024 16:45:59 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294563 Archived-At: --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Mattias Engdeg=E5rd writes: > 24 okt. 2024 kl. 19.13 skrev Sebasti=E1n Mon=EDa : > >> Attached a patch with the corrections mentioned so far. > > Fine as far as I'm concerned. You could use `search-forward` instead > of `re-search-forward` since you aren't actually using a regexp any > more. > --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-More-lax-doctype-check-in-EWW--bug-73133.patch Content-Description: search-forward >From ab4a00e3ae5c8b2f6a9d3355df0ee406dbccaee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebasti=C3=A1n=20Mon=C3=ADa?= Date: Thu, 24 Oct 2024 13:09:11 -0400 Subject: [PATCH] More lax doctype check in EWW (bug#73133) The regexp to match doctype tags was simplified and will match more legacy entries; also correct binding of case-fold-search. * lisp/net/eww.el (eww--html buffer-list): Update function. --- lisp/net/eww.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 7bbbeadaedd..ec2f4e494e4 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -660,15 +660,14 @@ eww--html-if-doctype "Return \"text/html\" if RESPONSE-BUFFER has an HTML doctype declaration. HEADERS is unused." ;; https://html.spec.whatwg.org/multipage/syntax.html#the-doctype - (let ((case-fold-search t) - (target - "\\|system +\\(\\\"\\|'\\)+about:legacy-compat\\)")) - (with-current-buffer response-buffer - (goto-char (point-min)) - ;; match basic and also legacy variants as - ;; specified in link above - (when (re-search-forward target nil t) - "text/html")))) + (with-current-buffer response-buffer + (let ((case-fold-search t)) + (save-excursion + (goto-char (point-min)) + ;; match basic and also legacy variants as + ;; specified in link above - being purposely lax about it + (when (search-forward "