[cxml-cvs] CVS update: cxml/xml/xml-parse.lisp

David Lichteblau dlichteblau at common-lisp.net
Sun Nov 27 12:39:37 UTC 2005


Update of /project/cxml/cvsroot/cxml/xml
In directory common-lisp.net:/tmp/cvs-serv15151/xml

Modified Files:
	xml-parse.lisp 
Log Message:
character range pruefen

Date: Sun Nov 27 13:39:37 2005
Author: dlichteblau

Index: cxml/xml/xml-parse.lisp
diff -u cxml/xml/xml-parse.lisp:1.25 cxml/xml/xml-parse.lisp:1.26
--- cxml/xml/xml-parse.lisp:1.25	Sun Nov 27 13:26:09 2005
+++ cxml/xml/xml-parse.lisp	Sun Nov 27 13:39:36 2005
@@ -1217,7 +1217,7 @@
                                 (%put-unicode-char data collect)))))))
             (t
              (unread-rune c input)
-             (values :CDATA (read-cdata input))) ))))))))
+             (values :CDATA (read-cdata input)))))))))))
 
 (defun read-pe-reference (zinput)
   (let* ((input (car (zstream-input-stack zinput)))
@@ -3158,6 +3158,18 @@
 (defun read-cdata (input)
   (read-data-until* ((lambda (rune)
                        (declare (type rune rune))
+		       (when (or (and (%rune< rune #/U+0020)
+				      (not (or (%rune= rune #/U+0009)
+					       (%rune= rune #/U+000a)
+					       (%rune= rune #/U+000d))))
+				 ;; Surrogates nicht ausschliessen, denn wir
+				 ;; haben ja UTF-16 Runen.
+				 #+(or)
+				 (and (%rune<= #/U+D800 rune)
+				      (%rune< rune #/U+E000))
+				 (%rune= rune #/U+FFFE)
+				 (%rune= rune #/U+FFFF))
+			 (wf-error "code point invalid: ~A" rune))
                        (or (%rune= rune #/<) (%rune= rune #/&)))
                      input
                      source start end)




More information about the Cxml-cvs mailing list