aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark A. Hershberger2005-05-26 14:35:47 +0000
committerMark A. Hershberger2005-05-26 14:35:47 +0000
commitf8ab034e35f9f1acc1ca3f4a2401c67403472b9c (patch)
tree971fd0e2525625d8a05d685f7b888a7e856e445c
parent6441d280dfcc2c809ea14ba65c4cd505ad1927dc (diff)
downloademacs-f8ab034e35f9f1acc1ca3f4a2401c67403472b9c.tar.gz
emacs-f8ab034e35f9f1acc1ca3f4a2401c67403472b9c.zip
2005-05-26 Mark A. Hershberger <mah@everybody.org>
* xml.el (xml-substitute-special): Don't die for undefined xml entities.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/xml.el8
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 852de36e6b9..dbd80ea6f38 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12005-05-26 Mark A. Hershberger <mah@everybody.org>
2
3 * xml.el (xml-substitute-special): Don't die for undefined xml
4 entities.
5
12005-05-26 Lute Kamstra <lute@gnu.org> 62005-05-26 Lute Kamstra <lute@gnu.org>
2 7
3 * arc-mode.el (archive-mode): 8 * arc-mode.el (archive-mode):
diff --git a/lisp/xml.el b/lisp/xml.el
index daf5689c18b..f9527a276b1 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -84,6 +84,9 @@
84;;** 84;;**
85;;******************************************************************* 85;;*******************************************************************
86 86
87(defconst xml-undefined-entity "?"
88 "What to substitute for undefined entities")
89
87(defvar xml-entity-alist 90(defvar xml-entity-alist
88 '(("lt" . "<") 91 '(("lt" . "<")
89 ("gt" . ">") 92 ("gt" . ">")
@@ -745,9 +748,10 @@ This follows the rule [28] in the XML specifications."
745 ((eq (length this-part) 0) 748 ((eq (length this-part) 0)
746 (error "XML: (Not Well-Formed) No entity given")) 749 (error "XML: (Not Well-Formed) No entity given"))
747 (t 750 (t
748 (when xml-validating-parser 751 (if xml-validating-parser
749 (error "XML: (Validity) Undefined entity `%s'" 752 (error "XML: (Validity) Undefined entity `%s'"
750 this-part)))))) 753 this-part)
754 xml-undefined-entity)))))
751 755
752 (cond ((null children) 756 (cond ((null children)
753 ;; FIXME: If we have an entity that expands into XML, this won't work. 757 ;; FIXME: If we have an entity that expands into XML, this won't work.