diff lisp/xml.el @ 62752:d0f8033496b1

2005-05-26 Mark A. Hershberger <mah@everybody.org> * xml.el (xml-substitute-special): Don't die for undefined xml entities.
author Mark A. Hershberger <mah@everybody.org>
date Thu, 26 May 2005 14:35:47 +0000
parents e696b8c143a0
children 3609dc754369 01137c1fdbe9
line wrap: on
line diff
--- a/lisp/xml.el	Thu May 26 13:41:35 2005 +0000
+++ b/lisp/xml.el	Thu May 26 14:35:47 2005 +0000
@@ -84,6 +84,9 @@
 ;;**
 ;;*******************************************************************
 
+(defconst xml-undefined-entity "?"
+  "What to substitute for undefined entities")
+
 (defvar xml-entity-alist
   '(("lt"   . "<")
     ("gt"   . ">")
@@ -745,9 +748,10 @@
 		    ((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.