rrichards               Fri Dec 17 07:21:35 2004 EDT

  Modified files:              (Branch: PHP_5_0)
    /php-src/ext/xml    compat.c 
  Log:
  MFH: Fixed bug #31139 (XML Parser Functions seem to drop & when parsing)
  
http://cvs.php.net/diff.php/php-src/ext/xml/compat.c?r1=1.32.2.6&r2=1.32.2.7&ty=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.32.2.6 php-src/ext/xml/compat.c:1.32.2.7
--- php-src/ext/xml/compat.c:1.32.2.6   Sun Nov 21 09:26:26 2004
+++ php-src/ext/xml/compat.c    Fri Dec 17 07:21:34 2004
@@ -280,7 +280,8 @@
 
                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;
                                        

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to