From: php at jesperkristensen dot dk Operating system: Windows XP PHP version: 5.1.1 PHP Bug Type: DOM XML related Bug description: DOMNode->nodeValue expects xml instead of simple string
Description: ------------ DOMNode->nodeValue expects an xml-string. If a string containing an &-character in inputet, only the string be fore that character will be saved. If the string containg a xml entity, the &-character wille not be substituted with its entity but simply be written into the file. This thing worked as expected in PHP 5.0.x Reproduce code: --------------- // In the example $myNode a DOMNode object, created from the following piece of xml: <node></node> $myNode->nodeValue = "Me & You"; // Actual xml file: <node>Me </node> // Expected xml file: <node>Me & You</node> $myNode->nodeValue ="Me & You"; // Actual xml file: <node>Me & You</node> // Expected xml file: <node>Me &amp; You</node> $val = $myNode->nodeValue; // Works as expected $myNode->nodeValue = $myNode->nodeValue; // This will change the content of <node>, if it contains "&" -- Edit bug report at http://bugs.php.net/?id=35943&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35943&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35943&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35943&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=35943&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=35943&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=35943&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=35943&r=needscript Try newer version: http://bugs.php.net/fix.php?id=35943&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=35943&r=support Expected behavior: http://bugs.php.net/fix.php?id=35943&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=35943&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=35943&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=35943&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35943&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=35943&r=dst IIS Stability: http://bugs.php.net/fix.php?id=35943&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=35943&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=35943&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=35943&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=35943&r=mysqlcfg