diff --git a/src/libCStreamedXML/300_parser.c b/src/libCStreamedXML/300_parser.c index 8966bde..998ccff 100644 --- a/src/libCStreamedXML/300_parser.c +++ b/src/libCStreamedXML/300_parser.c @@ -1,6 +1,6 @@ /* libCStreamedXML/src/libCStreamedXML/300_parser.c * - * (c)2006, Laurence Withers. Released under the GNU GPL. See file + * (c)2006-2009, Laurence Withers. Released under the GNU GPL. See file * COPYING for more information / terms of license. */ @@ -216,10 +216,13 @@ int csxml_feedChar(struct csxml* ctx, char ch) break; case ClassEntity: - ctx->parsingAttr = 0; - ctx->state = StateEntity; - break; + if(ctx->expandEntities) { + ctx->parsingAttr = 0; + ctx->state = StateEntity; + break; + } + /* fall through */ default: APPEND_CH(buffer, ch); break;