From ac3dc26cf4690741c8619fe7f8298519947bcae5 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 2 Mar 2003 02:48:39 +0000 Subject: [PATCH] Reject documents that contain entity references whose replacement text isn't fully defined. --- v7/src/xml/xml-parser.scm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/v7/src/xml/xml-parser.scm b/v7/src/xml/xml-parser.scm index 85e6c998b..22e9e5172 100644 --- a/v7/src/xml/xml-parser.scm +++ b/v7/src/xml/xml-parser.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: xml-parser.scm,v 1.22 2003/03/01 16:53:16 cph Exp $ +$Id: xml-parser.scm,v 1.23 2003/03/02 02:48:39 cph Exp $ Copyright 2001,2002,2003 Massachusetts Institute of Technology @@ -713,7 +713,11 @@ USA. (if expand? (expand-entity-value-string name (car elements) p) (vector (car elements))) - (vector (make-xml-entity-ref name))))) + (begin + (if (or *standalone?* *internal-dtd?*) + (perror p "Reference to partially-defined entity" + name)) + (vector (make-xml-entity-ref name)))))) (begin (if (or *standalone?* *internal-dtd?*) (perror p "Reference to undefined entity" name)) -- 2.25.1