changeset 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 16493952e648
children 3cf2ae5f446d
files lisp/ChangeLog lisp/xml.el
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu May 26 13:41:35 2005 +0000
+++ b/lisp/ChangeLog	Thu May 26 14:35:47 2005 +0000
@@ -1,3 +1,8 @@
+2005-05-26  Mark A. Hershberger  <mah@everybody.org>
+
+	* xml.el (xml-substitute-special): Don't die for undefined xml
+	entities.
+
 2005-05-26  Lute Kamstra  <lute@gnu.org>
 
 	* arc-mode.el (archive-mode):
--- 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.