ID: 39973
Updated by: [EMAIL PROTECTED]
Reported By: l dot chemwolo at heinosoft dot eu
-Status: Open
+Status: Feedback
Bug Type: XML related
Operating System: Ubuntu
PHP Version: 5CVS-2006-12-28 (snap)
New Comment:
Please "a short but complete example script max. 10-20 lines long"
which does not include non-existing files etc.
Previous Comments:
------------------------------------------------------------------------
[2006-12-28 12:41:26] l dot chemwolo at heinosoft dot eu
It gives the following as the result:
Bill
&
John Keen
It seems to take the tag <builder>Bill & John Keen</builder> to be
containing three cdata sections within it. Therefore the '&' overwrites
the 'Bill' and the 'John Keen' overwrites the 'Bill' and finally I have
'John Keen' as the cdata value for this tag; making it seem like it
dropped the ampersand and anything before it.
------------------------------------------------------------------------
[2006-12-28 12:33:32] l dot chemwolo at heinosoft dot eu
Reproduce code:
---------------
<?php
require_once 'Parser.php';
class CluistraParser extends XML_Parser{
function cdataHandler($parser, $data)
{
$data=trim($data);
echo $data."<br/>";
}
}
$cluistra=new CluistraParser();
$cluistra->setInputFile("afile.xml");
$success = $cluistra->parse();
if (PEAR::isError($success)) {
die('Parsing failed: '.$success->getMessage());
}
/*afile.xml has:
<?xml version='1.0' encoding='ISO-8859-1'?>
<builder>Bill & John Keen</builder>*/
?>
------------------------------------------------------------------------
[2006-12-28 10:03:34] [EMAIL PROTECTED]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2006-12-28 08:00:37] l dot chemwolo at heinosoft dot eu
I saw an almost similar bug reported by someone for php 5.0.3. The
report is http://bugs.php.net/bug.php?id=31139&edit=2.
------------------------------------------------------------------------
[2006-12-28 07:24:28] l dot chemwolo at heinosoft dot eu
I meant I could not see version 5.1.2 on the section "PHP version" so I
just picked one of the listed when submitting bug report.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/39973
--
Edit this bug report at http://bugs.php.net/?id=39973&edit=1