Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
XML Beautifer - Bug #5450: Parser strip many tags
3
--FILE--
4
<?php
5
/*
6
 * This test acts differently on PHP4 and PHP5...
7
 *
8
 * On PHP 4.4.9, the tags are not stripped at all,
9
 * but the output formatting isn't correct.
10
 *
11
 * On PHP 5.2.4, the tags are stripped as reported
12
 * on this bug.
13
 */
14
 
15
require_once 'XML/Beautifier.php';
16
 
17
$string = <<<EOF
18
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE bookmark SYSTEM "bookmark.dtd"><bookmark><category><![CDATA[ this cdata will be stripped ]]></category></bookmark>
19
EOF;
20
 
21
$xml = new XML_Beautifier();
22
echo $xml->formatString($string);
23
?>
24
--EXPECT--
25
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>
26
<!DOCTYPE bookmark SYSTEM "bookmark.dtd">
27
<bookmark>
28
    <category>
29
        <![CDATA[ this cdata will be stripped ]]>
30
    </category>
31
</bookmark>
32