|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #17540 CDATA incorrect for non block elements
Submitted: 2002-05-31 02:08 UTC Modified: 2002-12-04 18:15 UTC
From: tim at zero-interactive dot com Assigned:
Status: No Feedback Package: XML related
PHP Version: 4.2.1 OS: Win 2K Pro
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: tim at zero-interactive dot com
New email:
PHP Version: OS:


 [2002-05-31 02:08 UTC] tim at zero-interactive dot com
Running PHP 4.2.1 with Apache 2.0.36 on Windows 2000 Profrofessional.  PHP is running as an Apache module.

XML extension enabled
XSLT extension enabled

For some reason when parsing documents that like:

<para>Some text <test /> rest of para text</para>

The CDATA that is returned through the xml_set_character_data_handler seems to return the rest of the para CDATA instead of nothing.

After the data handler has been called, then it calls the element handler to close the <test/> tag.

An easy way to test is to keep track of the current tag that the parser is on (by setting it in the open element handler) and then running strlen over the CDATA has it hits the test tag.

Logically it should close the tag, then process the CDATA or at least return blank CDATA for the test tag.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-11-24 23:30 UTC]
Please try using this CVS snapshot:
For Windows:

 [2002-12-04 18:15 UTC]
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Open". Thank you.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 21 20:01:30 2024 UTC