php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35031 tag contents are handled the wrong way they do contain:???
Submitted: 2005-10-31 10:24 UTC Modified: 2005-10-31 10:43 UTC
From: robert dot bouwens at swissmains dot com Assigned:
Status: Not a bug Package: *XML functions
PHP Version: 5.0.5 OS: windows xc sp2
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: robert dot bouwens at swissmains dot com
New email:
PHP Version: OS:

 

 [2005-10-31 10:24 UTC] robert dot bouwens at swissmains dot com
Description:
------------
<NAME>H?chstgeschwindigkeit</NAME> 
The upper tag will not be corectly handled when using the xml_set_character_data_handler. The document is correctly formatted using utf-8 coding standards.
The elementhandler for the upper tag will be called twice:
1st: "H"
2nd: "?chstgeschwindigkeit" which is a pain when creating html tables.

Reproduce code:
---------------
xml_set_character_data_handler( $parser, "daten" );

function daten( $parser, $xml_data )
{  
// Datenbereich ausgeben
if ( $this->valid_list_item == true )
{
$sdata = utf8_decode( $xml_data );
$this->data[$this->cv][] = utf8_decode( $sdata );
print ( $sdata );
print ( "|" );
}
}


Expected result:
----------------
The tag character handler does not recognize extended cahractersets. The tag character handler for the tag "NAME" should only be called once.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-31 10:43 UTC] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

An XML parser is allowed to breakup character data like this, this is therefore not a bug. Your application needs to deal with this. The same would happen incase you have an entity there. If you still believe it is a bug, you need to talk to the libxml2 authors, as it\'s their library which does this behavior. 
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Mon Dec 06 16:03:33 2021 UTC