From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.3.2 PHP Bug Type: DOM XML related Bug description: DOCTYPE breaks CDATA handling
Hi..! The following code parses the same XML Structure and dumps it right away. The only difference is the 'missing' doctpye for the later one. Even though the output differs a lot ;) I'm not exactly sure if this is a php or more a libxml bug. It used to work on php 4.3.1 with LibXML2 2.4.19, wheras it does not on 4.3.2 with libxml2 2.5.x <?PHP $xml=<<<EOF <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <body> some markup... <script>//<![CDATA[ .. some js code ]]></script> some more markup </body> </html> EOF; $dom=domxml_open_mem($xml); echo $dom->dump_mem(true, 'UTF-8'); $xml2=<<<EOF <?xml version="1.0" encoding="iso-8859-1"?> <html xmlns="http://www.w3.org/1999/xhtml"> <body> some markup... <script>//<![CDATA[ .. some js code ]]></script> some more markup </body> </html> EOF; $dom=domxml_open_mem($xml2); echo $dom->dump_mem(true, 'UTF-8'); ?> -- Edit bug report at http://bugs.php.net/?id=24044&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24044&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24044&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24044&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24044&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24044&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24044&r=support Expected behavior: http://bugs.php.net/fix.php?id=24044&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24044&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24044&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24044&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24044&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24044&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24044&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24044&r=gnused