From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#46764: Extra ">" sails right past XML validator Date: Thu, 25 Feb 2021 16:48:59 +0100 Message-ID: <87h7m0407o.fsf@gnus.org> References: <87eeh5m3pj.5.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30265"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 46764@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 25 16:50:22 2021 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 1lFIuE-0007ld-5i for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Feb 2021 16:50:22 +0100 Original-Received: from localhost ([::1]:59308 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lFIuD-0004jP-9E for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 25 Feb 2021 10:50:21 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53158) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lFItu-0004hw-TS for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2021 10:50:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lFItu-0006kq-M3 for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2021 10:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lFItu-0005U6-HX for bug-gnu-emacs@gnu.org; Thu, 25 Feb 2021 10:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Feb 2021 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46764 X-GNU-PR-Package: emacs Original-Received: via spool by 46764-submit@debbugs.gnu.org id=B46764.161426815921024 (code B ref 46764); Thu, 25 Feb 2021 15:50:02 +0000 Original-Received: (at 46764) by debbugs.gnu.org; 25 Feb 2021 15:49:19 +0000 Original-Received: from localhost ([127.0.0.1]:39030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFIt7-0005Sv-2U for submit@debbugs.gnu.org; Thu, 25 Feb 2021 10:49:19 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:55006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lFIt3-0005Se-PK for 46764@debbugs.gnu.org; Thu, 25 Feb 2021 10:49:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EDJH5QVEBDduUIVZqQFuDHJM5yLYthTZdJE6sesQBBc=; b=S5U4kWfUpzHG8/VgoAjPiIVI6J VpwcIybidvYxdKRrbLSqduqK6t98x7NzDOr3Xi7yv3NmzG8u1b+PSfjn7LcfHQdbORErmrUVJHAII zm6oviMPi0Fz4fxlHNu2H4bwTqsfhg56ramwP559okE8L5qig0XqDX2gtCDF7cTIdhT4=; Original-Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lFIsu-0000u0-Li; Thu, 25 Feb 2021 16:49:03 +0100 X-Now-Playing: The Ex's _Turn_: "Listen To The Painters" In-Reply-To: <87eeh5m3pj.5.fsf@jidanni.org> ("=?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson"'s message of "Thu, 25 Feb 2021 07:43:52 +0800") 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" Xref: news.gmane.io gmane.emacs.bugs:200790 Archived-At: =E7=A9=8D=E4=B8=B9=E5=B0=BC Dan Jacobson writes: > $ cat e.xml > > > > $ emacs e.xml > says at the bottom: (nXML Valid) I can confirm that this problem still exists in Emacs 28. It seems to stem from this bit of code: (defun xmltok-forward () (setq xmltok-start (point)) (let* ((case-fold-search nil) (space-count (skip-chars-forward " \t\r\n")) (ch (char-after))) (cond ((eq ch ?\<) (cond ((> space-count 0) (setq xmltok-type 'space)) (t (forward-char 1) (xmltok-scan-after-lt)))) ((eq ch ?\&) (cond ((> space-count 0) (setq xmltok-type 'space)) (t (forward-char 1) (xmltok-scan-after-amp 'xmltok-handle-entity)))) ((re-search-forward "[<&]\\|\\(]]>\\)" nil t) (cond ((not (match-beginning 1)) So (xmltok-forward) on the ">" will just return `data'. Is it checking just < and & for validity on purpose? Anybody remember what the thought process might have been here? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no