diff options
| author | Rob Richards <rrichards@php.net> | 2004-12-17 12:20:50 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2004-12-17 12:20:50 +0000 |
| commit | b462fc8bd20137ec983a887fec95902bed1161ad (patch) | |
| tree | 2bd4189b021642762dc227cc024c526a3e63b179 | |
| parent | 3f835d67baab16edffd23153fe5d5e6cb33b4e94 (diff) | |
| download | php-git-b462fc8bd20137ec983a887fec95902bed1161ad.tar.gz | |
Fixed bug #31139 (XML Parser Functions seem to drop & when parsing)
| -rw-r--r-- | ext/xml/compat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/xml/compat.c b/ext/xml/compat.c index e0d7f08bd7..2b877e1ecb 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -280,7 +280,8 @@ _get_entity(void *user, const xmlChar *name) if (ret == NULL || (parser->parser->instate != XML_PARSER_ENTITY_VALUE && parser->parser->instate != XML_PARSER_ATTRIBUTE_VALUE)) { if (ret == NULL || ret->etype == XML_INTERNAL_GENERAL_ENTITY || ret->etype == XML_INTERNAL_PARAMETER_ENTITY || ret->etype == XML_INTERNAL_PREDEFINED_ENTITY) { - if (parser->h_default) { + /* Predefined entities will expand unless no cdata handler is present */ + if (parser->h_default && ! (ret && ret->etype == XML_INTERNAL_PREDEFINED_ENTITY && parser->h_cdata)) { xmlChar *entity; int len; |
