php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34319 < followed by a a charcter breaks up a tag
Submitted: 2005-08-31 16:15 UTC Modified: 2005-08-31 16:17 UTC
From: walther dot princee at centric dot nl Assigned:
Status: Not a bug Package: SimpleXML related
PHP Version: 5.0.4 OS: windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: walther dot princee at centric dot nl
New email:
PHP Version: OS:

 

 [2005-08-31 16:15 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-31 16:17 UTC] derick@php.net
Do a view source in your browser, then you see why...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 16 22:01:30 2024 UTC