summaryrefslogtreecommitdiff
path: root/lisp/xml.el
diff options
context:
space:
mode:
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.