diff options
author | David Engster <deng@randomsample.de> | 2017-01-24 22:47:53 +0100 |
---|---|---|
committer | David Engster <deng@randomsample.de> | 2017-01-24 22:56:05 +0100 |
commit | aea6701839357eb139e29056274996c70f42b860 (patch) | |
tree | a8c19dae97567fce72d8712b58892a7376016769 /lisp/xml.el | |
parent | 267c98ae4849e87bcee49ebbb7adcf211c60cd47 (diff) | |
download | emacs-aea6701839357eb139e29056274996c70f42b860.tar.gz |
xml: Fix parsing of default namespace with quoted names
* lisp/xml.el (xml-parse-attlist): Properly extract namespace when
parsing is done with quoted symbol names (bug#23440).
* test/lisp/xml-tests.el (xml-parse-test--default-namespace-qnames)
(xml-parse-test-default-namespace-qnames): Test for the above.
Diffstat (limited to 'lisp/xml.el')
-rw-r--r-- | lisp/xml.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/xml.el b/lisp/xml.el index cd801be3083..be2ac96f264 100644 --- a/lisp/xml.el +++ b/lisp/xml.el @@ -646,8 +646,10 @@ 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 ()) - end-pos name) + (let* ((attlist ()) + (symbol-qnames (eq (car-safe xml-ns) 'symbol-qnames)) + (xml-ns (if symbol-qnames (cdr xml-ns) xml-ns)) + end-pos name) (skip-syntax-forward " ") (while (looking-at (eval-when-compile (concat "\\(" xml-name-re "\\)\\s-*=\\s-*"))) |