unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63740: broken and questionable attribute normalisation in xml.el
@ 2023-05-26 15:14 Mattias Engdegård
  2023-05-30 15:50 ` Mattias Engdegård
  0 siblings, 1 reply; 2+ messages in thread
From: Mattias Engdegård @ 2023-05-26 15:14 UTC (permalink / raw)
  To: 63740; +Cc: Juanma Barranquero, Mark A. Hershberger

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?






^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#63740: broken and questionable attribute normalisation in xml.el
  2023-05-26 15:14 bug#63740: broken and questionable attribute normalisation in xml.el Mattias Engdegård
@ 2023-05-30 15:50 ` Mattias Engdegård
  0 siblings, 0 replies; 2+ messages in thread
From: Mattias Engdegård @ 2023-05-30 15:50 UTC (permalink / raw)
  To: 63740-done

I decided that the attempt to collapse whitespace in attributes is wrong and removed the ineffective attempt to do so in 9ae212fb1e. Bug closed.






^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-05-30 15:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-26 15:14 bug#63740: broken and questionable attribute normalisation in xml.el Mattias Engdegård
2023-05-30 15:50 ` Mattias Engdegård

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).