From: jacob at jacobweber dot com Operating system: Fedora Core 3 PHP version: 5.0.4 PHP Bug Type: XML related Bug description: XML_OPTION_SKIP_WHITE skips important spaces
Description: ------------ Turning on XML_OPTION_SKIP_WHITE causes the space in the following XML to be skipped: <a>' &</a> I believe this is incorrect. It doesn't skip the space in: <a>& '</a> Jacob Reproduce code: --------------- $xmlStr = "<a>' &</a>"; $xmlParser = xml_parser_create(); xml_parser_set_option($xmlParser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($xmlParser, $xmlStr, $xmlArr); xml_parser_free($xmlParser); print_r($xmlArr); Expected result: ---------------- Array ( [0] => Array ( [tag] => A [type] => complete [level] => 1 [value] => ' & ) ) Actual result: -------------- Array ( [0] => Array ( [tag] => A [type] => complete [level] => 1 [value] => '& ) ) (note the missing space after the apostrophe -- Edit bug report at http://bugs.php.net/?id=33240&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33240&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33240&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33240&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=33240&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=33240&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=33240&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=33240&r=needscript Try newer version: http://bugs.php.net/fix.php?id=33240&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=33240&r=support Expected behavior: http://bugs.php.net/fix.php?id=33240&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=33240&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=33240&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=33240&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33240&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=33240&r=dst IIS Stability: http://bugs.php.net/fix.php?id=33240&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=33240&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=33240&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=33240&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=33240&r=mysqlcfg