php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47078 xmlparser does not return entities
Submitted: 2009-01-12 12:32 UTC Modified: 2009-01-12 12:48 UTC
From: jan dot matousek at skype dot net Assigned:
Status: Not a bug Package: XML related
PHP Version: 5.2.8 OS: Mac OS X 10.5
Private report: No CVE-ID: None
 [2009-01-12 12:32 UTC] jan dot matousek at skype dot net
Description:
------------
XML parser does not return entities (& > < "). The problem occurs only when running PHP as apache2 module, and does not occur with PHP apache2 module supplied with Mac OS (PHP 5.2.6 built: Jul 15 2008 23:16:51).

Having compiled php-5.2.8 and httpd-2.2.10. Configure command is 

./configure --with-apxs2=/usr/local/apache2/bin/apxs

Also happens with compiled php-5.2.6, I have not tried other versions.
I am prepared to provide more details when necessary.

Reproduce code:
---------------
<?php

function char_data($p, $data) { echo "[[$data]]\n"; }

$p = xml_parser_create();
xml_set_character_data_handler($p, 'char_data');
xml_parse($p, '<?xml version="1.0"?><root>c&amp;a</root>', true);


Expected result:
----------------
[[c]]
[[&]]
[[a]]


Actual result:
--------------
[[c]]
[[a]]


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-12 12:48 UTC] scottmac@php.net
Duplicate of bug #45996
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 14:01:31 2024 UTC