From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] shr.el: correct SVG attribute case Date: Thu, 01 Feb 2024 12:02:57 +0200 Message-ID: <864jes1oz2.fsf@gnu.org> References: <878r4cxjt8.fsf@sachachua.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3744"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Sacha Chua Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 01 11:06:32 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rVTxm-0000jq-VB for ged-emacs-devel@m.gmane-mx.org; Thu, 01 Feb 2024 11:06:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rVTvT-0005H1-Dv; Thu, 01 Feb 2024 05:04:07 -0500 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 1rVTuT-0004Tj-I1 for emacs-devel@gnu.org; Thu, 01 Feb 2024 05:03:05 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVTuT-0007BE-2L; Thu, 01 Feb 2024 05:03:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OxfuC+E1M6FHyU8O5OhTmWMDeKh8sNGKgbrOh6zdzNA=; b=Y0B+3mmjSRIl ne0Ucr9UjNtCYIjSPnEKhEYfE+F3CbUUU/JMh3q9Z1Qm78hGB5tmKbzf13wyeSArdu6cJf6AuJUVV kTOME9BG/LDc5gpN6dyeAAF+JNmVEyAKld+S1PxBSKST09cG6rUkB/+wK/zZTf0qnEAyt35Cio0EQ rcRrRz8kqMX/nHUZi3xfgYAkjFEOIaCCMGN44puHAG7gvLWNFDZ0LFZ/PwQah/GqLWrc0DWfi41+C 5dD45vSDP17iu0AcE9jn5yDJEqY9Htp6/F6CCawfWqmeSivIqUb1dNEECBwPS1Kg4Io4wMiSHbdZq LUlHK1NEZvDkNQCCFZ3r0g==; In-Reply-To: <878r4cxjt8.fsf@sachachua.com> (message from Sacha Chua on Fri, 26 Jan 2024 09:15:15 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:315697 Archived-At: > From: Sacha Chua > Date: Fri, 26 Jan 2024 09:15:15 -0500 > > I've attached a patch for restoring the correct case of SVG attributes > parsed with libxml-parse-html-region when displayed with shr, so that > SVGs can be displayed properly. HTML attributes are case-insensitive and > converted to lowercase, but SVG attributes are case-sensitive, so things > like viewBox don't work if they're lowercased. It looks like other > implementations (ex: https://github.com/w3c/svgwg/issues/161 ) also use > the workaround of fixing attribute cases for SVGs, so I took the list > from > https://html.spec.whatwg.org/multipage/parsing.html#parsing-main-inforeign > and fixed those attributes. Thanks, installed on the master branch. Please in the future post patches to the bug tracker (using "M-x submit-emacs-patch"), so that the discussion could be more easily discovered if needed in the future.