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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 05 22:01:29 2024 UTC