| 1 |
lars |
1 |
--TEST--
|
|
|
2 |
XML Beautifier - Bug #2144: High-UTF entities in attributed decoded as ?
|
|
|
3 |
--FILE--
|
|
|
4 |
<?php
|
|
|
5 |
/*
|
|
|
6 |
* The bug report complains of entities being changed to '?" marks,
|
|
|
7 |
* which I see happening on PHP 4.4.9 but not on PHP 5.2.4.
|
|
|
8 |
*
|
|
|
9 |
* Note that this test case fails on PHP5 because the XML tag
|
|
|
10 |
* is not being included in the output. That problem is
|
|
|
11 |
* already reported in Bug #5450. This test case
|
|
|
12 |
* should begin passing on PHP5 after #5450 is fixed.
|
|
|
13 |
*/
|
|
|
14 |
|
|
|
15 |
require_once 'XML/Beautifier.php';
|
|
|
16 |
|
|
|
17 |
$xml = <<<EOF
|
|
|
18 |
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
19 |
<bogustag
|
|
|
20 |
attribute="Инновационныйдайджест">
|
|
|
21 |
<content />
|
|
|
22 |
</bogustag>
|
|
|
23 |
EOF;
|
|
|
24 |
|
|
|
25 |
$bf = new XML_Beautifier();
|
|
|
26 |
echo $bf->formatString( $xml);
|
|
|
27 |
|
|
|
28 |
?>
|
|
|
29 |
--EXPECT--
|
|
|
30 |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
|
31 |
<bogustag attribute="Инновационный дайджест">
|
|
|
32 |
<content />
|
|
|
33 |
</bogustag>
|