From 3b1478b7e8da7be992dde4882c6dead56b32a271 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 24 Apr 2006 08:50:10 +0000 Subject: [PATCH] fix the error message for invalid code point in content c.f. bug #339311 * parser.c: fix the error message for invalid code point in content c.f. bug #339311 Daniel --- ChangeLog | 5 +++++ parser.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 97663bf7..4a3b4932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 24 10:50:19 CEST 2006 Daniel Veillard + + * parser.c: fix the error message for invalid code point in content + c.f. bug #339311 + Wed Apr 19 13:16:23 CEST 2006 Kasimier Buchcik * xmlschemas.c test/schemas/restriction-enum-1* diff --git a/parser.c b/parser.c index d3c8e5e0..12b2d7f8 100644 --- a/parser.c +++ b/parser.c @@ -3661,6 +3661,13 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { } } } + if ((cur != 0) && (!IS_CHAR(cur))) { + /* Generate the error and skip the offending character */ + xmlFatalErrMsgInt(ctxt, XML_ERR_INVALID_CHAR, + "PCDATA invalid Char value %d\n", + cur); + NEXTL(l); + } } /**