From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#63740: broken and questionable attribute normalisation in xml.el Date: Fri, 26 May 2023 17:14:53 +0200 Message-ID: <48DF5E96-D7EF-46A7-877A-D6EA64E6DB3E@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15775"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Juanma Barranquero , "Mark A. Hershberger" To: 63740@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 26 17:16:24 2023 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 1q2ZB1-0003xt-P0 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 17:16:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2ZAj-0008MZ-1R; Fri, 26 May 2023 11:16:05 -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 1q2ZAh-0008ME-2n for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 11:16:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2ZAg-0000CY-R6 for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 11:16:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q2ZAg-0004WW-8y for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 11:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 May 2023 15:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63740 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Emacs Bug Report Original-Received: via spool by submit@debbugs.gnu.org id=B.168511410717299 (code B ref -1); Fri, 26 May 2023 15:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 26 May 2023 15:15:07 +0000 Original-Received: from localhost ([127.0.0.1]:50562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Z9n-0004Ux-DX for submit@debbugs.gnu.org; Fri, 26 May 2023 11:15:07 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q2Z9l-0004Up-4j for submit@debbugs.gnu.org; Fri, 26 May 2023 11:15:06 -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 1q2Z9g-0007zG-AZ for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 11:15:01 -0400 Original-Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2Z9d-0008En-0B for bug-gnu-emacs@gnu.org; Fri, 26 May 2023 11:14:58 -0400 Original-Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-4f4b384c09fso970952e87.3 for ; Fri, 26 May 2023 08:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685114094; x=1687706094; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=Nkmc0swKyz3YQKMcCnJCaKO0Ia1xqH63V5DlpdFKOms=; b=Jh4xNmzOL91uWVT7+wO93pLqpmnrzkdR4iXfsRiIox8Uf4oqjNgLpyP8ybuWOwdaFX CcMpsx9rzw7JCzo/rzH2KZPWXIw5rh19qlQiCIHOYkXOfUMdHFAZFuL4TI5zawuAyGu5 gjJhe//1J60UmXxroM6JbGUtcG+6n9kHojmqlFY1ZHfmbbxfB6P3vFb+Du3MgTyU7Zzn KZSjuhfAjHcrI7HuLttVzqenBDmWS8z0JEM4V8OEIjfl/ckKg57l7DhNKjRoGN4wNK/2 h5eQzhEmvMXX2U8vJKixGzeglquytqGB2jCK1tqwN2jci3FpRa5yRyrdNl/1+a7HtJ2P l5Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685114094; x=1687706094; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Nkmc0swKyz3YQKMcCnJCaKO0Ia1xqH63V5DlpdFKOms=; b=i+Bg0EgBUBcKel+097xDEBhiq5g9wkKmcfemNZWVluww5es52p3UM8seIduDl4lxSy fOf/cgd2+uvtUN7163ok1JNMky7NiCbO5QxuwQYQWfBKML4qg+xhIQL2VAZudDCfKeF8 ZcMzlFxXqVqD5UyH04zixFG6oyn8bNDF7cQhE0znLl4xZEbtxeIwKr6pmuTtEdMGp9/e +7AyeC1XnO+hXaDgC/IklwrOTiuSkaNMcXal8/x+sVyl02Ig/p0ynUrU+Jjyx2jMzckz mB+Yc5al1CFhrXGwhd4DbwTSRiyQVq58eT3lnByppoUZZvCC4wtRE0aow11UUkbjzElG X5DA== X-Gm-Message-State: AC+VfDwpI143fa4Jw4GDfy2xk37kteaqtjYUvaHpYjUq5yk8BJQYv7bV ZCofqnxy66shkQ5kOxA5VkaLqgXpdPg= X-Google-Smtp-Source: ACHHUZ4MuFzgDjtp+KHn/LvSQmy8FhSxuKyXHaXik5Tyh0f3Il1Dt7xAxsS2XNTG1EOhZlLm+vigng== X-Received: by 2002:a05:6512:24c:b0:4f3:8507:d90d with SMTP id b12-20020a056512024c00b004f38507d90dmr622884lfo.34.1685114094297; Fri, 26 May 2023 08:14:54 -0700 (PDT) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id d10-20020ac25eca000000b004f3778239adsm669623lfq.19.2023.05.26.08.14.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 May 2023 08:14:53 -0700 (PDT) X-Mailer: Apple Mail (2.3654.120.0.1.15) Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=mattias.engdegard@gmail.com; helo=mail-lf1-x130.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:262438 Archived-At: In `xml-parse-attlist`, we see: ;; Multiple whitespace characters should be replaced with a single = one ;; in the attributes (let ((string (match-string-no-properties 1))) (replace-regexp-in-string "\\s-\\{2,\\}" " " string) ... The call to `replace-regexp-in-string` is of course useless and there is = now a compiler warning telling us, which is how this came to light. However, should we really collapse whitespace here? If I'm reading the = spec correctly, it's not done for CDATA attributes and we have no reason = to believe any other type, do we? I'm no XML expert but it looks like the code is correct and we can just = remove the call to `replace-regexp-in-string` (and the misleading = comment). Or?