PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » XML » XML_Beautifier » Bug #1233

Empty tags replaced by single tag

Details

Submitted2004-04-17 18:48 UTC
Fromguillaume dot lecanu at online dot fr
Assignedschst
StatusWont fix
PackageXML_Beautifier
PHP Version4.3.4
OSDebian Sid
Roadmaps(Not assigned)

Comments

[2004-04-17 18:48 UTC] guillaume dot lecanu at online dot fr

Description:
------------
The empty tags are replaced by single tag :
<span></span>
to
<span />

Reproduce code:
---------------
<?php
include_once 'XML/Beautifier.php';

$xml = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
.'<example></example>';

$fmt = new XML_Beautifier();
$out =& $fmt->formatString($xml);

print "<br />Original XML : <br />".htmlSpecialChars($xml);
print "<br />Formatted XML : <br />".htmlSpecialChars($out);
?>

Expected result:
----------------
Original XML :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><example></example>
Formatted XML :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><example></example>

Actual result:
--------------
Original XML :
<?xml version="1.0" encoding="UTF-8" standalone="no"?><example></example>
Formatted XML :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><example />

[2004-04-30 07:15 UTC] unknown_delivery at yahoo dot com

You need to replace output as html.