Bug #30875 [Ver->Csd]: xml_parse_into_struct() does not resolve entities in element content
| From: | cmb@php.net | Date: | Tue, 09 Oct 2018 14:11:16 +0000 |
| Subject: | Bug #30875 [Ver->Csd]: xml_parse_into_struct() does not resolve entities in element content | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-217487@lists.php.net to get a copy of this message | ||
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
+Status: Closed
Type: Bug
Package: XML related
Operating System: *
PHP Version: 4CVS, 5CVS (2005-02-03)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2845f859c19965691855c66bc18d94a4e06ff329
Log: Fix #30875: xml_parse_into_struct() does not resolve entities
Previous Comments:
------------------------------------------------------------------------
[2018-10-09 13:35:55] cmb@php.net
> 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>
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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