From:             exaton at free dot fr
Operating system: Windows XP
PHP version:      5.0.3
PHP Bug Type:     XML related
Bug description:  No longer parses "&"

Description:
------------
I parse my XML with the "XML parser functions" (xml_parser_create() and
all that). Up to PHP 5.0.2 I had no problem, and suddenly the following
has appeared in 5.0.3 :

I used to put é in an XML file to recuperate the é HTML
entity in my page output and therefore an acute-accentuated e in the text.
This was perfectly coherent with XML specs, and worked fine.

Now the output on the page has simply dropped the "&" that should come
from & , therefore parsing é into eacute; -- which of
course is perfectly unwanted.

é is of course not the only affected entity : I'm not seeing a
single & in any content obtained from parsing XML.

Note : explicitely passing a charset string to xml_parser_create() did not
solve this.

Reproduce code:
---------------
$this -> parser = xml_parser_create();

xml_parser_set_option($this -> parser, XML_OPTION_SKIP_WHITE, 1); 
xml_parser_set_option($this -> parser, XML_OPTION_CASE_FOLDING, 0);

// $this -> contents has the plaintext contents of an XML file, prone to
contain things like é

xml_parse_into_struct($this -> parser, $this -> contents, $this -> values,
$this -> index);

xml_parser_free($this -> parser);

Expected result:
----------------
When I eventually recuperate the output with my custom architecture, I
expect things like é to have been parsed into é -- they
always were up to and including PHP 5.0.2 .

Actual result:
--------------
In PHP 5.0.3, é for example is now parsed into eacute;

-- 
Edit bug report at http://bugs.php.net/?id=31139&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31139&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31139&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31139&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31139&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31139&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31139&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31139&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31139&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31139&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31139&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31139&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31139&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31139&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31139&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31139&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31139&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31139&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31139&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31139&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31139&r=mysqlcfg

Reply via email to