#34319 [NEW]: < followed by a a charcter breaks up a tag

From: Date: Wed, 31 Aug 2005 14:15:35 +0000
Subject: #34319 [NEW]: < followed by a a charcter breaks up a tag
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84248@lists.php.net to get a copy of this message
From: walther dot princee at centric dot nl Operating system: windows PHP version: 5.0.4 PHP Bug Type: SimpleXML related Bug description: &lt; followed by a a charcter breaks up a tag Description: ------------ when &lt; is followed by a character (not a space or digit) I loose the characters till the next < Reproduce code: --------------- <?PHP $xmlstr = <<<EOD <?xml version="1.0"?> <root> <message> <description>test for greater then 5 &gt;5 and less then a &lt; a here</description> <callnummer>20050002</callnummer> </message> <message> <description>test for greater then 5 &gt;5 and less then a &lt;a here</description> <callnummer>20050002</callnummer> </message> </root> EOD; $xml = simplexml_load_string($xmlstr); foreach ($xml->message as $k) { foreach ($k->children() as $a=>$b) { echo "$a = $b<br>"; } } ?> Expected result: ---------------- description = test for greater then 5 >5 and less then a < a here callnummer = 20050002 description = test for greater then 5 >5 and less then a <a here callnummer = 20050002 Actual result: -------------- description = test for greater then 5 >5 and less then a < a here callnummer = 20050002 description = test for greater then 5 >5 and less then a callnummer = 20050002 -- Edit bug report at http://bugs.php.net/?id=34319&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34319&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34319&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34319&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34319&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34319&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34319&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34319&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34319&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34319&r=support Expected behavior: http://bugs.php.net/fix.php?id=34319&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34319&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34319&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34319&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34319&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34319&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34319&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34319&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34319&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34319&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34319&r=mysqlcfg

« previous php.bugs (#84248) next »