From: Rob Richards Date: Sun, 11 Jan 2009 12:00:30 +0000 (+0000) Subject: fix bug #45996 (libxml2 2.7 causes breakage with character data in xml_parse()) X-Git-Tag: php-5.4.0alpha1~191^2~4562 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c00dcede67ddb505c908c92e0a01eb706e468f9;p=php fix bug #45996 (libxml2 2.7 causes breakage with character data in xml_parse()) --- diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 86c645bda6..0c33cf5260 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -482,6 +482,10 @@ XML_ParserCreate_MM(const XML_Char *encoding, const XML_Memory_Handling_Suite *m parser->parser->charset = XML_CHAR_ENCODING_NONE; #endif +#if LIBXML_VERSION >= 20703 + xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX); +#endif + parser->parser->replaceEntities = 1; parser->parser->wellFormed = 0; if (sep != NULL) {