summaryrefslogtreecommitdiff
path: root/lisp/xml.el
diff options
context:
space:
mode:
authorMark A. Hershberger <mah@everybody.org>2005-05-26 14:35:47 +0000
committerMark A. Hershberger <mah@everybody.org>2005-05-26 14:35:47 +0000
commitf8ab034e35f9f1acc1ca3f4a2401c67403472b9c (patch)
tree971fd0e2525625d8a05d685f7b888a7e856e445c /lisp/xml.el
parent6441d280dfcc2c809ea14ba65c4cd505ad1927dc (diff)
downloademacs-f8ab034e35f9f1acc1ca3f4a2401c67403472b9c.tar.gz
2005-05-26 Mark A. Hershberger <mah@everybody.org>
* xml.el (xml-substitute-special): Don't die for undefined xml entities.
Diffstat (limited to 'lisp/xml.el')
-rw-r--r--lisp/xml.el8
1 files changed, 6 insertions, 2 deletions
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 @@
;;**
;;*******************************************************************
+(defconst xml-undefined-entity "?"
+ "What to substitute for undefined entities")
+
(defvar xml-entity-alist
'(("lt" . "<")
("gt" . ">")
@@ -745,9 +748,10 @@ This follows the rule [28] in the XML specifications."
((eq (length this-part) 0)
(error "XML: (Not Well-Formed) No entity given"))
(t
- (when xml-validating-parser
+ (if xml-validating-parser
(error "XML: (Validity) Undefined entity `%s'"
- this-part))))))
+ this-part)
+ xml-undefined-entity)))))
(cond ((null children)
;; FIXME: If we have an entity that expands into XML, this won't work.