Req #30875 [Ver]: xml_parse_into_struct() does not resolve entities in element content
Edit report at https://bugs.php.net/bug.php?id=30875&edit=1
ID: 30875
Updated by: cmb@php.net
Reported by: joern_h at gmx dot net
Summary: xml_parse_into_struct() does not resolve entities in
element content
Status: Verified
Type: Feature/Change Request
Package: XML related
Operating System: *
PHP Version: 4CVS, 5CVS (2005-02-03)
Block user comment: N
Private report: N
New Comment:
> ext/xml just misses this functionality.
Well, actually it disables this functionality. Therefore,
re-classifying as bug.
The problem is that xml_parse_into_struct() sets up a default
handler[1], but this handler doesn't do anything, since there is
no actual PHP handler installed[2]. This is basically the same as
this script[3]; simply removing the empty default handler[4]
solves the issue.
[1] <https://github.com/php/php-src/blob/php-7.3.0RC2/ext/xml/xml.c#L1437>
[2] <https://github.com/php/php-src/blob/php-7.3.0RC2/ext/xml/xml.c#L953-L967>
[3] <https://3v4l.org/PUrG6>
[4] <https://3v4l.org/lcEF0>
Previous Comments:
------------------------------------------------------------------------
[2018-03-14 14:24:05] cmb@php.net
Related To: Bug #35271
------------------------------------------------------------------------
[2016-06-29 18:40:59] cmb@php.net
> When using xml_parse_into_struct, entities from the internal dtd
> are not resolved in element content. Entities in attribute
> values are resolved properly.
Indeed, see <https://3v4l.org/8cgbf>. In my opinion, this
inconsistency is a bug.
------------------------------------------------------------------------
[2005-02-16 07:35:57] sniper@php.net
After some investigating of the issue: ext/xml just misses this functionality. No bug but feature
request -> reclassified.
------------------------------------------------------------------------
[2005-02-03 14:59:37] joern_h at gmx dot net
This bug still occurs with current PHP4 (Feb 3 2005 06:13:06) and PHP5 (Feb 3 2005 12:17:00)
snapshots.
------------------------------------------------------------------------
[2005-02-03 04:41:34] sniper@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=30875
--
Edit this bug report at https://bugs.php.net/bug.php?id=30875&edit=1
Thread (8 messages)