Home » XML » XML_FastCreate » Bug #7897
can't create cdata
Details
| Submitted | 2006-06-14 09:24 UTC |
|---|---|
| From | neta-master at ywcafe dot net |
| Status | Verified |
| Package | XML_FastCreate |
| PHP Version | 4.4.2 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2006-06-14 09:24 UTC] neta-master at ywcafe dot net
Description:
------------
cdata method cant create correct cdata.
Test script:
---------------
<?php
require_once 'XML/FastCreate.php';
$x =& XML_FastCreate::factory('Text');
$x->root(
$x->cdata("foo<h1>bar</h1>foo")
);
$x->toXML();
?>
Expected result:
----------------
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root><![CDATA[
foo<h1>bar</h1>foo
]]></root>
Actual result:
--------------
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<root>/*<![CDATA[*/
foo<h1>bar</h1>foo
/*]]>*/</root>