php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #44917 CDATA with german umlauts fails
Submitted: 2008-05-05 14:29 UTC Modified: 2008-09-03 01:00 UTC
Votes:8
Avg. Score:4.2 ± 1.4
Reproduced:5 of 5 (100.0%)
Same Version:3 (60.0%)
Same OS:1 (20.0%)
From: me at mkavel dot de Assigned:
Status: No Feedback Package: SimpleXML related
PHP Version: 5.2.6 OS: Gentoo
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-05-05 14:29 UTC] me at mkavel dot de
Description:
------------
Some special German (latin1) caracters could not be set correctly.

The code produces different output between addCild and directly set of the value in an existing child.

Reproduce code:
---------------
// 1
$xml->obermenue[0]->addChild("titel","<![CDATA[&Uuml;bertrumpfen]]>");

// 2
$xml->obermenue[0]->titel="<![CDATA[&Uuml;bertrumpfen]]>";


Expected result:
----------------
1:
Output: <titel>&lt;![CDATA[&Uuml;bertrumpfen]]&gt;</titel>

2:
Output: <titel>&lt;![CDATA[&Uuml;bertrumpfen]]&gt;</titel>



Actual result:
--------------
1:
Output: <titel>&lt;![CDATA[&Uuml;bertrumpfen]]&gt;</titel>

Please look at the "<" and "&" in the first Output. It changed to "&lt;" and the "&" not change.

2:
Output: <titel>&lt;![CDATA[&amp;Uuml;bertrumpfen]]&gt;</titel>

This one the "<" changed to "&lt;" too but the "&" chnaged to "&amp;"

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-26 23:01 UTC] jani@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc. If the script requires a 
database to demonstrate the issue, please make sure it creates 
all necessary tables, stored procedures etc.

Please avoid embedding huge scripts into the report.


 [2008-09-03 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2009-01-08 16:53 UTC] quamis at gmail dot com
duplicate of http://bugs.php.net/bug.php?id=44478

PS: you(PHP bug section devs) have some serios problems with the captha... missed it twice because of the small image.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC