summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDavid Engster <deng@randomsample.de>2017-04-17 16:52:08 +0200
committerDavid Engster <deng@randomsample.de>2017-04-17 17:17:00 +0200
commit09eaf661eb6ea49c6324d8819a872c523133dc2b (patch)
treed073537c697580c114b0b06a66172b27900c9b18 /lisp
parent630df0587e1069b2cd2f2536d5fb61175adac3a2 (diff)
downloademacs-09eaf661eb6ea49c6324d8819a872c523133dc2b.tar.gz
xml: Properly handle symbol-qnames for attribute parsing
* lisp/xml.el (xml-parse-attlist): Do not strip 'symbol-qnames from xml-ns argument (reverts aea67018) (Bug#26533). (xml-maybe-do-ns): Properly handle default namespace by not interning new symbol when 'special' flag is set. * tests/lisp/xml-tests.el (xml-parse-test--namespace-attribute-qnames) (xml-parse-namespace-attribute-qnames): Add test for Bug#26533.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/xml.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/xml.el b/lisp/xml.el
index be2ac96f264..88dc70bc413 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -437,6 +437,7 @@ in the XML-NS argument."
(if symbol-qnames (cdr xml-ns) xml-ns)))
"")))
(if (and symbol-qnames
+ (not special)
(not (string= prefix "xmlns")))
(intern (concat ns lname))
(cons ns (if special "" lname))))
@@ -646,10 +647,8 @@ surpassed `xml-entity-expansion-limit'"))))
(defun xml-parse-attlist (&optional xml-ns)
"Return the attribute-list after point.
Leave point at the first non-blank character after the tag."
- (let* ((attlist ())
- (symbol-qnames (eq (car-safe xml-ns) 'symbol-qnames))
- (xml-ns (if symbol-qnames (cdr xml-ns) xml-ns))
- end-pos name)
+ (let ((attlist ())
+ end-pos name)
(skip-syntax-forward " ")
(while (looking-at (eval-when-compile
(concat "\\(" xml-name-re "\\)\\s-*=\\s-*")))