emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 9ae212fb1e5 4/7: xml.el: remove incorrect and botched attribute w


From: Mattias Engdegård
Subject: master 9ae212fb1e5 4/7: xml.el: remove incorrect and botched attribute whitespace collapse
Date: Tue, 30 May 2023 11:46:53 -0400 (EDT)

branch: master
commit 9ae212fb1e5ef8cffd10ee174004caabf2027ba3
Author: Mattias Engdegård <mattiase@acm.org>
Commit: Mattias Engdegård <mattiase@acm.org>

    xml.el: remove incorrect and botched attribute whitespace collapse
    
    * lisp/xml.el (xml-parse-attlist): Don't attempt to collapse multiple
    consecutive whitespace characters into a single space, which is wrong
    to do a this point when attributes must be assumed to be CDATA.
    
    The code was actually unintentionally correct since it forgot to use
    the return value of `replace-regexp-in-string` (bug#63740).
---
 lisp/xml.el | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/lisp/xml.el b/lisp/xml.el
index 58d17a4b340..9095653416e 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -669,10 +669,7 @@ Leave point at the first non-blank character after the 
tag."
       (if (assoc name attlist)
          (error "XML: (Not Well-Formed) Each attribute must be unique within 
an element"))
 
-      ;; 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)
        (let ((expansion (xml-substitute-special string)))
          (unless (stringp expansion)
            ;; We say this is the constraint.  It is actually that



reply via email to

[Prev in Thread] Current Thread [Next in Thread]