#34319 [Opn->Bgs]: < followed by a a charcter breaks up a tag

From: Date: Wed, 31 Aug 2005 14:17:38 +0000
Subject: #34319 [Opn->Bgs]: < followed by a a charcter breaks up a tag
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84249@lists.php.net to get a copy of this message
ID: 34319 Updated by: derick@php.net Reported By: walther dot princee at centric dot nl -Status: Open +Status: Bogus Bug Type: SimpleXML related Operating System: windows PHP Version: 5.0.4 New Comment: Do a view source in your browser, then you see why... Previous Comments: ------------------------------------------------------------------------ [2005-08-31 16:15:34] walther dot princee at centric dot nl 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 this bug report at http://bugs.php.net/?id=34319&edit=1

« previous php.bugs (#84249) next »