summaryrefslogtreecommitdiff
path: root/lisp/xml.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-02-14 22:35:54 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2013-02-14 22:35:54 -0800
commit648e5523fbfc3dfbce58f66437112bc442470c87 (patch)
tree6ead7871ba1026168c7f7c4d1f4cffa5241f864b /lisp/xml.el
parentdec2a322921d74de8f251a54931d4c50ab00713d (diff)
parent974c7646ec5b2985a50007c9d599154d667df349 (diff)
downloademacs-648e5523fbfc3dfbce58f66437112bc442470c87.tar.gz
Merge from emacs-24; up to 2012-12-19T13:01:16Z!michael.albinus@gmx.de
Diffstat (limited to 'lisp/xml.el')
-rw-r--r--lisp/xml.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/xml.el b/lisp/xml.el
index 2232746f02a..a3d34670bfb 100644
--- a/lisp/xml.el
+++ b/lisp/xml.el
@@ -611,7 +611,7 @@ references."
xml-validating-parser
(error "XML: (Validity) Invalid character reference `%s'"
(match-string 0)))
- (replace-match (or (string val) xml-undefined-entity) t t))
+ (replace-match (if val (string val) xml-undefined-entity) t t))
;; For an entity reference, search again from the start of
;; the replaced text, since the replacement can contain
;; entity or character references, or markup.
@@ -620,7 +620,7 @@ references."
(and (null val)
xml-validating-parser
(error "XML: (Validity) Undefined entity `%s'" ref))
- (replace-match (cdr val) t t)
+ (replace-match (or (cdr val) xml-undefined-entity) t t)
(goto-char (match-beginning 0)))
;; Check for XML bombs.
(and xml-entity-expansion-limit